Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changes to add default test directories (running from make test)

  • Loading branch information...
commit b3d8d59065990541c66cad5e84ba0d0c836684c2 1 parent 5bfcd27
zoe slattery authored
View
7 src/configuration/rtCommandLineOptions.php
@@ -158,6 +158,13 @@ public function parseCommandLineOptions($argv)
$i++;
$this->options[$option] = $argv[$i];
}
+
+ if(empty($this->testFilename)) {
+ //set default options if being run from PHP top level directory (as in make test)
+ if(file_exists(getcwd() . "/" . "sapi/cli/php")) {
+ $this->testFilename = array('tests', 'ext', 'Zend', 'ZendEngine2', 'sapi/cli', 'sapi/cgi');
+ }
+ }
}
/**
View
1  src/run-tests.php
@@ -33,6 +33,7 @@ function rtExceptionHandler(Exception $e) {
require_once dirname(__FILE__) . '/rtAutoload.php';
$s = microtime(true);
+var_dump($argv);
$phpTestRun = new rtPhpTestRun($argv);
$phpTestRun->run();
View
5 src/testrun/rtPhpTestRun.php
@@ -314,6 +314,11 @@ public function setReportStatus() {
} else if ($this->runConfiguration->hasCommandLineOption('vvv')) {
$this->reportStatus = 3;
}
+
+ //Set the default for runs from 'make test'
+ if ( file_exists(getcwd() . "/sapi/cli/php")) {
+ $this->reportStatus = 1;
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.