msopacua Wed Oct 23 16:53:20 2002 EDT Modified files: /php4 run-tests.php Log: 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 Index: php4/run-tests.php diff -u php4/run-tests.php:1.85 php4/run-tests.php:1.86 --- php4/run-tests.php:1.85 Wed Oct 23 16:13:42 2002 +++ php4/run-tests.php Wed Oct 23 16:53:20 2002 @@ -139,6 +139,9 @@ $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 @@ define('PHP_QA_EMAIL', '[EMAIL PROTECTED]'); 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(getenv('REPORT_EXIT_STATUS') == 1 and $sum_results['FAILED']) { + exit(1); +} + // // Send Email to QA Team //
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php