Making phpunit plugin log the TAP string in the event it fails to process it.
This commit is contained in:
parent
1dbb7cec1e
commit
f40f88a0f3
|
@ -132,9 +132,16 @@ class PhpUnit implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin
|
|||
$success &= $this->runDir($this->directory);
|
||||
}
|
||||
|
||||
$output = $this->phpci->getLastOutput();
|
||||
$tapParser = new TapParser($output);
|
||||
$output = $tapParser->parse();
|
||||
$tapString = $this->phpci->getLastOutput();
|
||||
|
||||
try {
|
||||
$tapParser = new TapParser($tapString);
|
||||
$output = $tapParser->parse();
|
||||
} catch (\Exception $ex) {
|
||||
$this->phpci->logFailure($tapString);
|
||||
throw $ex;
|
||||
}
|
||||
|
||||
$failures = $tapParser->getTotalFailures();
|
||||
|
||||
$this->build->storeMeta('phpunit-errors', $failures);
|
||||
|
|
Loading…
Reference in a new issue