Skip to content

Commit 4d43cbe

Browse files
committed
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.
1 parent 97de8cf commit 4d43cbe

5 files changed

+7
-1
lines changed

ext/mysqli/tests/mysqli_pam_sha256.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ if (!$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db))
7575
}
7676

7777
$link->close();
78+
echo "nocache";
7879
?>
7980
--FILE--
8081
<?php

ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ if (!$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db))
8888
}
8989

9090
$link->close();
91+
echo "nocache";
9192
?>
9293
--INI--
9394
mysqlnd.sha256_server_public_key="test_sha256_ini"

ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ if (!$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db))
8585
}
8686

8787
$link->close();
88+
echo "nocache";
8889
?>
8990
--FILE--
9091
<?php

ext/mysqli/tests/mysqli_pam_sha256_public_key_option_invalid.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ if (!$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db))
8585
}
8686

8787
$link->close();
88+
echo "nocache";
8889
?>
8990
--FILE--
9091
<?php

run-tests.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3749,7 +3749,9 @@ public function checkSkip(string $php, string $code, string $checkFile, string $
37493749

37503750
save_text($checkFile, $code, $tempFile);
37513751
$result = trim(system_with_timeout("$php \"$checkFile\"", $env));
3752-
$this->skips[$key][$code] = $result;
3752+
if (strpos($result, 'nocache') === false) {
3753+
$this->skips[$key][$code] = $result;
3754+
}
37533755
$this->misses++;
37543756

37553757
if (!$this->keepFile) {

0 commit comments

Comments
 (0)