]> granicus.if.org Git - php/commitdiff
Trigger an error if the run-test.php file is not found
authorTomas V.V.Cox <cox@php.net>
Wed, 22 May 2002 12:44:21 +0000 (12:44 +0000)
committerTomas V.V.Cox <cox@php.net>
Wed, 22 May 2002 12:44:21 +0000 (12:44 +0000)
Make the run-tests pear cmd run with the CGI SAPI

pear/PEAR/Command/Package.php

index a4c113487d64fcc03739c69bb0e3d049684a9478..0ca6ebcb9379bf8d0f3f06744bd2986830b0990c 100644 (file)
@@ -331,9 +331,12 @@ Run regression tests with PHP\'s regression testing script (run-tests.php).',
         $run_tests = $this->config->get('php_dir') . DIRECTORY_SEPARATOR . 'run-tests.php';
         if (!file_exists($run_tests)) {
             $run_tests = PEAR_INSTALL_DIR . DIRECTORY_SEPARATOR . 'run-tests.php';
+            if (!file_exists($run_tests)) {
+                return $this->raiseError("No `run-test.php' file found");
+            }
         }
         $plist = implode(" ", $params);
-        $cmd = "$php -d include_path=$cwd$ps$ip $run_tests $plist";
+        $cmd = "$php -C -d include_path=$cwd$ps$ip -f $run_tests -- $plist";
         system($cmd);
         return true;
     }