From 4d43cbe333690171753e9b8663df93d3762e02a8 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 4 Mar 2021 16:26:47 +0100 Subject: [PATCH] Add mechanism to skip the skipif cache If the SKIPIF section return nocache, don't cache the result. This is used by tests that perform complex test set in conjunction with skip checks, and need to be evaluated every time. --- ext/mysqli/tests/mysqli_pam_sha256.phpt | 1 + ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt | 1 + ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt | 1 + .../tests/mysqli_pam_sha256_public_key_option_invalid.phpt | 1 + run-tests.php | 4 +++- 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ext/mysqli/tests/mysqli_pam_sha256.phpt b/ext/mysqli/tests/mysqli_pam_sha256.phpt index 8866409efe..29df5c1fde 100644 --- a/ext/mysqli/tests/mysqli_pam_sha256.phpt +++ b/ext/mysqli/tests/mysqli_pam_sha256.phpt @@ -75,6 +75,7 @@ if (!$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db)) } $link->close(); +echo "nocache"; ?> --FILE-- query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db)) } $link->close(); +echo "nocache"; ?> --INI-- mysqlnd.sha256_server_public_key="test_sha256_ini" diff --git a/ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt b/ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt index 9b5639ff9a..1493c37737 100644 --- a/ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt +++ b/ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt @@ -85,6 +85,7 @@ if (!$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db)) } $link->close(); +echo "nocache"; ?> --FILE-- query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db)) } $link->close(); +echo "nocache"; ?> --FILE-- skips[$key][$code] = $result; + if (strpos($result, 'nocache') === false) { + $this->skips[$key][$code] = $result; + } $this->misses++; if (!$this->keepFile) { -- 2.50.1