1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 06:42:41 +01:00

Report tests results whenever possible

Summary: This adjusts the behavior of PytestTestEngine so that it correctly reports test failures natively, rather than throwing a command error.

Test Plan: Yeah right

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D10866
This commit is contained in:
David Cramer 2014-11-17 15:25:48 -08:00 committed by epriestley
parent 52947cfd92
commit 6a36584ae1

View file

@ -13,7 +13,16 @@ final class PytestTestEngine extends ArcanistUnitTestEngine {
$cover_tmp = new TempFile();
$future = $this->buildTestFuture($junit_tmp, $cover_tmp);
$future->resolvex();
list($err, $stdout, $stderr) = $future->resolve();
if (!Filesystem::pathExists($junit_tmp)) {
throw new CommandException(
"Command failed with error #{$err}!",
$future->getCommand(),
$err,
$stdout,
$stderr);
}
$future = new ExecFuture('coverage xml -o %s', $cover_tmp);
$future->setCWD($this->project_root);