Commit: 5d9e7526a065b7d661bf5fee6c9aaf222f29ae83 Author: Christoph M. Becker <cmbecke...@gmx.de> Wed, 25 Jul 2018 23:39:40 +0200 Parents: 77ab09143f7d7cb941db5aa256d9290487a9a3ec Branches: master
Link: http://git.php.net/?p=web/qa.git;a=commitdiff;h=5d9e7526a065b7d661bf5fee6c9aaf222f29ae83 Log: Fix recognition of test filenames The filenames of submitted test runs are determined from each line of the test results, which has the format `testname [filename]` for failed tests. If the testname contains a bracketed phrase, the filename is not correctly recognized. Expected failing tests have the format `testname [filename] XFAIL REASON: reason`, though. We fix this by asserting that the bracketed filename is either at the end of the string or that it's been followed by `XFAIL`. We also cater to output of redirected tests, which add lines with the format `via [filename]`, which we have to ignore. This is supposed to fix the resulting mess that currently can be seen on <http://qa.php.net/reports/run_tests.php?version=7.2.0> for new bug reports. However, this kind of filename recognition is still fragile, especially with regard to potential changes of the run-tests.php output. It might be sensible to change it so it can more reliably be parsed. We'd still would have to cater to tests results produced with the present test runner, though. Changed paths: M reports/parserfunc.php Diff: diff --git a/reports/parserfunc.php b/reports/parserfunc.php index 82ea966..6b58770 100644 --- a/reports/parserfunc.php +++ b/reports/parserfunc.php @@ -265,7 +265,7 @@ function parse_phpmaketest($version, $status=null, $file) $currentTest = ''; } elseif ($currentPart == 'failedTest' || $currentPart == 'expectedFailedTest') { - preg_match('@ \[([^\]]{1,})\]@', $row, $tab); + preg_match('@(?<!via) \[([^\]]{1,})\]\s*(?:$|XFAIL)@', $row, $tab); if (count($tab) == 2) if (!isset($extract[$currentPart]) || !in_array($tab[1], $extract[$currentPart])) $extract[$currentPart][] = $tab[1]; -- PHP Quality Assurance Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php