]> granicus.if.org Git - php/commitdiff
MFH
authorIlia Alshanetsky <iliaa@php.net>
Wed, 11 Dec 2002 16:49:27 +0000 (16:49 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 11 Dec 2002 16:49:27 +0000 (16:49 +0000)
run-tests.php

index fc77c1a2caa39e1cf086062e3b4f41560d407ca5..130294a16425b963d93ef68a152358dd956e5ffc 100755 (executable)
@@ -334,6 +334,15 @@ if ($sum_results['FAILED'] && !getenv('NO_INTERACTION')) {
                 * Send an email
                 */
                
+               /* Ask the user to provide an email address, so that QA team can contact the user */
+               if (!strncasecmp($user_input, 'y', 1)) {
+                       echo "Please enter your email address: ";
+                       flush();
+                       $fp = fopen("php://stdin", "r+");
+                       $user_email = trim(fgets($fp, 1024));
+                       $user_email = str_replace("@", " at ", str_replace(".", " dot ", $user_email));
+               }
+               
                $failed_tests_data = '';
                $sep = "\n" . str_repeat('=', 80) . "\n";
                
@@ -369,7 +378,9 @@ if ($sum_results['FAILED'] && !getenv('NO_INTERACTION')) {
                $failed_tests_data .= "Libtool:\n$libtool\n";
                $failed_tests_data .= "Compiler:\n$compiler\n";
                $failed_tests_data .= "Bison:\n". @shell_exec('bison --version'). "\n";
-               $failed_tests_data .= "\n\n";
+               $failed_tests_data .= "\n";
+               
+               $failed_tests_data .= "User's E-mail: ".$user_email."\n\n";
                
                $failed_tests_data .= $sep . "PHPINFO" . $sep;
                $failed_tests_data .= shell_exec($php.' -dhtml_errors=0 -i');