diff options
author | Melvyn Sopacua <msopacua@php.net> | 2002-10-23 20:53:20 +0000 |
---|---|---|
committer | Melvyn Sopacua <msopacua@php.net> | 2002-10-23 20:53:20 +0000 |
commit | 1de45a050c3858025a3df75b0cf70b26965afcc0 (patch) | |
tree | 35439d3d280f96cfd6d5997843416cf62280b358 /run-tests.php | |
parent | 1eb04a850e748bbab84369ad4218c63aa1f0b25b (diff) | |
download | php-git-1de45a050c3858025a3df75b0cf70b26965afcc0.tar.gz |
Implement 'no interaction' for automated tests
Implement exit status 1 to make actions for automated testing selectable
# Sorry Derick, was already working on this and the docs, see next commit
# and forthcoming email
Diffstat (limited to 'run-tests.php')
-rwxr-xr-x | run-tests.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/run-tests.php b/run-tests.php index 7868566fbb..b33105f76b 100755 --- a/run-tests.php +++ b/run-tests.php @@ -139,6 +139,9 @@ if (isset($argc) && $argc > 1) { $test_results[$name] = run_test($php,$name); } } + if(getenv('REPORT_EXIT_STATUS') == 1 and ereg('FAILED( |$)', implode(' ', $test_results))) { + exit(1); + } exit(0); } } @@ -248,8 +251,8 @@ Time taken : " . sprintf("%4d seconds", $end_time - $start_time) . " define('PHP_QA_EMAIL', 'php-qa@lists.php.net'); define('QA_SUBMISSION_PAGE', 'http://qa.php.net/buildtest-process.php'); -/* We got failed Tests, offer the user to send and e-mail to QA team */ -if ($sum_results['FAILED'] && !getenv("DONT_ASK_QA")) { +/* We got failed Tests, offer the user to send and e-mail to QA team, unless NO_INTERACTION is set */ +if ($sum_results['FAILED'] && !getenv('NO_INTERACTION')) { $fp = fopen("php://stdin", "r+"); fwrite($fp, "Some tests have failed, would you like to send the\nreport to PHP's QA team? [Yn]: "); fflush($fp); @@ -299,6 +302,10 @@ if ($sum_results['FAILED'] && !getenv("DONT_ASK_QA")) { } } +if(getenv('REPORT_EXIT_STATUS') == 1 and $sum_results['FAILED']) { + exit(1); +} + // // Send Email to QA Team // |