cvs: php4 /pear/PEAR/Command Package.php

From: Date: Sat, 07 Jun 2003 16:45:53 +0000
Subject: cvs: php4 /pear/PEAR/Command Package.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-10751@lists.php.net to get a copy of this message
cox Sat Jun 7 12:45:53 2003 EDT Modified files: /php4/pear/PEAR/Command Package.php Log: Added better error message to run-tests Index: php4/pear/PEAR/Command/Package.php diff -u php4/pear/PEAR/Command/Package.php:1.50 php4/pear/PEAR/Command/Package.php:1.51 --- php4/pear/PEAR/Command/Package.php:1.50 Tue Mar 18 07:06:07 2003 +++ php4/pear/PEAR/Command/Package.php Sat Jun 7 12:45:53 2003 @@ -17,7 +17,7 @@ // | Martin Jansen <mj@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Package.php,v 1.50 2003/03/18 12:06:07 ssb Exp $ +// $Id: Package.php,v 1.51 2003/06/07 16:45:53 cox Exp $ require_once 'PEAR/Common.php'; require_once 'PEAR/Command/Common.php'; @@ -441,16 +441,19 @@ $php = PHP_BINDIR . '/php' . (OS_WINDOWS ? '.exe' : ''); putenv("TEST_PHP_EXECUTABLE=$php"); $ip = ini_get("include_path"); - $ps = OS_WINDOWS ? ';' : ':'; - $run_tests = $this->config->get('php_dir') . DIRECTORY_SEPARATOR . 'run-tests.php'; + $ps = OS_WINDOWS ? ';' : ':'; + $run_tests = $rtsts = $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-tests.php' file found"); + return $this->raiseError("No `run-tests.php' file found at $rtsts. You need ". + "to copy there the run-tests.php file located ". + "inside the sources of your php distribution package, ". + "in order to make this command available."); } } - $plist = implode(" ", $params); - $cmd = "$php -C -d include_path=$cwd$ps$ip -f $run_tests -- $plist"; + $plist = implode(" ", $params); + $cmd = "$php -C -d include_path=$cwd$ps$ip -f $run_tests -- $plist"; system($cmd); return true; } @@ -650,7 +653,7 @@ fwrite($wp, $spec_contents); fclose($wp); $this->ui->outputData("Wrote RPM spec file $spec_file", $command); - + return true; }

« previous php.pear.cvs (#10751) next »