Changed default behavior to run a single PHPUnit config from the directory where the config file is read from, this can be changed via 'run_from: dir/'
This commit is contained in:
parent
789e4b7612
commit
de2fbc9672
|
@ -92,17 +92,19 @@ class PhpUnit implements \PHPCI\Plugin
|
|||
if (is_array($configPath)) {
|
||||
return $this->recurseArg($configPath, array($this, "runConfigFile"));
|
||||
} else {
|
||||
|
||||
$curdir = getcwd();
|
||||
|
||||
if ($this->runFrom) {
|
||||
$curdir = getcwd();
|
||||
chdir($this->phpci->buildPath.'/'.$this->runFrom);
|
||||
} else {
|
||||
chdir($this->phpci->buildPath.'/'.dirname($configPath));
|
||||
}
|
||||
|
||||
$cmd = $this->phpunit_cmd . ' %s -c "%s"';
|
||||
$success = $this->phpci->executeCommand($cmd, $this->args, $this->phpci->buildPath . $configPath);
|
||||
|
||||
if ($this->runFrom) {
|
||||
chdir($curdir);
|
||||
}
|
||||
chdir($curdir);
|
||||
|
||||
return $success;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue