abstract public function run();
- /**
- * This function is called after run() when the diff is created
- * Child classes should override this function if they want to
- * do more with the diff ID.
- */
- public function setDifferentialDiffID($id) {
- $this->diffID = $id;
- return $this;
- }
-
/**
* Modify the return value of this function in the child class, if
* you do not need to echo the test results after all the tests have
private $testResults;
private $diffID;
private $revisionID;
- private $unitWorkflow;
- private $lintWorkflow;
private $postponedLinters;
private $haveUncommittedChanges = false;
$this->dispatchDiffWasCreatedEvent($diff_info['diffid']);
- if ($this->unitWorkflow) {
- $this->unitWorkflow->setDifferentialDiffID($diff_info['diffid']);
- }
-
$this->updateLintDiffProperty();
$this->updateUnitDiffProperty();
$this->updateLocalDiffProperty();
$argv[] = $repository_api->getRelativeCommit();
}
$lint_workflow = $this->buildChildWorkflow('lint', $argv);
- $this->lintWorkflow = $lint_workflow;
if ($this->shouldAmend()) {
// TODO: We should offer to create a checkpoint commit.
$argv[] = '--rev';
$argv[] = $repository_api->getRelativeCommit();
}
- $this->unitWorkflow = $this->buildChildWorkflow('unit', $argv);
- $unit_result = $this->unitWorkflow->run();
+ $unit_workflow = $this->buildChildWorkflow('unit', $argv);
+ $unit_result = $unit_workflow->run();
switch ($unit_result) {
case ArcanistUnitWorkflow::RESULT_OKAY:
break;
}
- $this->testResults = $this->unitWorkflow->getTestResults();
+ $this->testResults = $unit_workflow->getTestResults();
return $unit_result;
} catch (ArcanistNoEngineException $ex) {
return $this->testResults;
}
- public function setDifferentialDiffID($id) {
- if ($this->engine) {
- $this->engine->setDifferentialDiffID($id);
- }
- return $this;
- }
-
private static function formatTestDuration($seconds) {
// Very carefully define inclusive upper bounds on acceptable unit test
// durations. Times are in milliseconds and are in increasing order.