Encode test ouput before returning it to the test framework
When a test fails hphp/test/run runs a regular expression over the test output and returns it to the python scripts that is running the tests on the continuous build machine. These scripts crash if presented with output that is not printable ASCII, which makes it very difficult to figure out why the test is failing. This change modifies hphp/test/run to first encode the test output with quoted_printable_encode before returning it to the python scripts.
Esse commit está contido em:
@@ -13,6 +13,7 @@
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
// force test run
|
||||
|
||||
#include "hphp/runtime/debugger/break_point.h"
|
||||
#include "hphp/runtime/debugger/debugger.h"
|
||||
|
||||
+2
-2
@@ -573,7 +573,7 @@ function run_test($options, $test) {
|
||||
# a poor man's aide for debugging
|
||||
shell_exec("diff --text -u $test.expectf $test.out > $test.diff 2>&1");
|
||||
|
||||
return preg_match("/^$wanted_re\$/s", $output);
|
||||
return quoted_printable_encode(preg_match("/^$wanted_re\$/s", $output));
|
||||
|
||||
} else if (file_exists("$test.expectregex")) {
|
||||
$wanted_re = file_get_contents("$test.expectregex");
|
||||
@@ -581,7 +581,7 @@ function run_test($options, $test) {
|
||||
# a poor man's aide for debugging
|
||||
shell_exec("diff --text -u $test.expectregex $test.out > $test.diff 2>&1");
|
||||
|
||||
return preg_match("/^$wanted_re\$/s", $output);
|
||||
return quoted_printable_encode(preg_match("/^$wanted_re\$/s", $output));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário