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

Let TestEngine know if the command that triggered tests is 'arc diff' or 'arc

unit'

Summary:
We want to handle 'arc unit' and 'arc diff' differently in our test
framework.

Test Plan:
Tested that with 'arc unit' the value was set to 'unit' and with 'arc diff'
the value was set to 'diff'.

Reviewed By: epriestley
Reviewers: slawekbiel, epriestley
CC: jungejason, grglr, aran, tuomaspelkonen, epriestley
Differential Revision: 430
This commit is contained in:
tuomaspelkonen 2011-06-10 12:40:01 -07:00
parent dcc76bb58b
commit 42c6f00315
2 changed files with 16 additions and 0 deletions

View file

@ -27,6 +27,7 @@ abstract class ArcanistBaseUnitTestEngine {
private $paths;
private $arguments = array();
protected $diffID;
private $enableAsyncTests;
final public function __construct() {
@ -61,6 +62,14 @@ abstract class ArcanistBaseUnitTestEngine {
return idx($this->arguments, $key, $default);
}
final public function setEnableAsyncTests($enable_async_tests) {
$this->enableAsyncTests = $enable_async_tests;
}
final public function getEnableAsyncTests() {
return $this->enableAsyncTests;
}
abstract public function run();
/**

View file

@ -99,6 +99,13 @@ EOTEXT
$this->engine->setPaths($paths);
$this->engine->setArguments($this->getPassthruArgumentsAsMap('unit'));
// Enable possible async tests only for 'arc diff' not 'arc unit'
if ($this->getParentWorkflow()) {
$this->engine->setEnableAsyncTests(true);
} else {
$this->engine->setEnableAsyncTests(false);
}
$results = $this->engine->run();
$status_codes = array(