Permalink
Browse files

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

  • Loading branch information...
1 parent 5bfcd27 commit b3d8d59065990541c66cad5e84ba0d0c836684c2 zoe slattery committed Oct 9, 2012
Showing with 13 additions and 0 deletions.
  1. +7 −0 src/configuration/rtCommandLineOptions.php
  2. +1 −0 src/run-tests.php
  3. +5 −0 src/testrun/rtPhpTestRun.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
@@ -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();
@@ -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;
+ }
}
}

0 comments on commit b3d8d59

Please sign in to comment.