The run-tests.sh script tries to find your php binary by checking $_ENV. This is not safe. If you have variables_order set to "GPCS" in php.ini (which is common), it will be empty. This is what the getenv() function is for. Patch fixes.
Also, it returns the results of the tests with simpletest_script_format_result(), which prints html special characters as if the output is html. Patch also fixes this by capturing the output and running it through htmlspecialchars_decode() so it's less ugly.
Comment | File | Size | Author |
---|---|---|---|
#12 | drupal-1477110-12.patch | 998 bytes | tim.plunkett |
#3 | un-f-runtests-script-3.patch | 1018 bytes | msonnabaum |
un-f-runtests-script.patch | 1.39 KB | msonnabaum | |
Comments
Comment #1
sunI'd RTBC the first hunk, but I'm not sure about the second one (which requires manual testing for various environments and scenarios [e.g., testbots]).
Comment #2
Damien Tournoud CreditAttribution: Damien Tournoud commentedI have been meaning to do the first hunk forever. For some reason, the default PHP production configuration doesn't include E in variables_order (which seems slightly retarded, but that's another issue).
The second one looks like a hack:
simpletest_script_format_result()
is local to the script runner, so we could likely fix it not to return HTML in some cases (what are those? verbose results?)Comment #3
msonnabaum CreditAttribution: msonnabaum commentedOk, here's just the env fix. The output fix should probably have it's own issue.
Comment #4
Damien Tournoud CreditAttribution: Damien Tournoud commentedComment #5
webchickThis looks backportable to D7, to me. Is it?
Comment #6
msonnabaum CreditAttribution: msonnabaum commentedTotally backportable.
Comment #7
xjmComment #8
Dries CreditAttribution: Dries commentedCommitted to 8.x. Moving to 7.x. Thanks!
Comment #9
tim.plunkettThis did not get pushed yet, setting back.
Comment #10
tim.plunketthttp://drupalcode.org/project/drupal.git/commit/4b6355f
Comment #11
msonnabaum CreditAttribution: msonnabaum commentedSame patch should apply fine for D7 with -p2.
Comment #12
tim.plunkettRerolled.
Comment #13
xjmDoes it look to anyone else like the little face is sadder than it used to be?
(RTBC)
Comment #14
webchickgreat thanks!
committed and pushed to 7.x.