From 0074a1d4e3a85d0d63118e7a30f4b7ed6da64695 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 4 Mar 2021 16:32:58 +0100 Subject: Make the nocache tag actually work If nocache is used, then we should return an empty string result, so the test doesn't get marked as borked. Also limit to an occurrence at the start, just like other skip tags. --- run-tests.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'run-tests.php') diff --git a/run-tests.php b/run-tests.php index a44a90bb7c..c04d2f4a97 100755 --- a/run-tests.php +++ b/run-tests.php @@ -3749,8 +3749,10 @@ class SkipCache save_text($checkFile, $code, $tempFile); $result = trim(system_with_timeout("$php \"$checkFile\"", $env)); - if (strpos($result, 'nocache') === false) { + if (strpos($result, 'nocache') !== 0) { $this->skips[$key][$code] = $result; + } else { + $result = ''; } $this->misses++; -- cgit v1.2.1