mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-26 00:32:41 +01:00
Don't explicitly name abstract base classes
Summary: Ref T5655. It is superfluous to include "base" in the name of an abstract base class. Furthermore, it is not done consistently within the code base. In order to retain compatibility with external code, I have kept the `ArcanistBaseWorkflow` class (which trivially extends from `ArcanistWorkflow`), but it is now deprecated and should output a warning message. Similarly for `ArcanistBaseUnitTestEngine`. Test Plan: Created a workflow which extends from `ArcanistBaseWorkflow`. Executed the workflow and saw a deprecation warning. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin, aurelijus Maniphest Tasks: T5655 Differential Revision: https://secure.phabricator.com/D9983
This commit is contained in:
parent
c6e6227ef9
commit
ef18ae08eb
53 changed files with 2036 additions and 2008 deletions
|
@ -16,7 +16,6 @@ phutil_register_library_map(array(
|
|||
'ArcanistBackoutWorkflow' => 'workflow/ArcanistBackoutWorkflow.php',
|
||||
'ArcanistBaseCommitParser' => 'parser/ArcanistBaseCommitParser.php',
|
||||
'ArcanistBaseCommitParserTestCase' => 'parser/__tests__/ArcanistBaseCommitParserTestCase.php',
|
||||
'ArcanistBaseTestResultParser' => 'unit/engine/ArcanistBaseTestResultParser.php',
|
||||
'ArcanistBaseUnitTestEngine' => 'unit/engine/ArcanistBaseUnitTestEngine.php',
|
||||
'ArcanistBaseWorkflow' => 'workflow/ArcanistBaseWorkflow.php',
|
||||
'ArcanistBaseXHPASTLinter' => 'lint/linter/ArcanistBaseXHPASTLinter.php',
|
||||
|
@ -168,6 +167,7 @@ phutil_register_library_map(array(
|
|||
'ArcanistSvnHookPreCommitWorkflow' => 'workflow/ArcanistSvnHookPreCommitWorkflow.php',
|
||||
'ArcanistTasksWorkflow' => 'workflow/ArcanistTasksWorkflow.php',
|
||||
'ArcanistTestCase' => 'infrastructure/testing/ArcanistTestCase.php',
|
||||
'ArcanistTestResultParser' => 'unit/engine/ArcanistTestResultParser.php',
|
||||
'ArcanistTextLinter' => 'lint/linter/ArcanistTextLinter.php',
|
||||
'ArcanistTextLinterTestCase' => 'lint/linter/__tests__/ArcanistTextLinterTestCase.php',
|
||||
'ArcanistTimeWorkflow' => 'workflow/ArcanistTimeWorkflow.php',
|
||||
|
@ -175,6 +175,7 @@ phutil_register_library_map(array(
|
|||
'ArcanistUncommittedChangesException' => 'exception/usage/ArcanistUncommittedChangesException.php',
|
||||
'ArcanistUnitConsoleRenderer' => 'unit/renderer/ArcanistUnitConsoleRenderer.php',
|
||||
'ArcanistUnitRenderer' => 'unit/renderer/ArcanistUnitRenderer.php',
|
||||
'ArcanistUnitTestEngine' => 'unit/engine/ArcanistUnitTestEngine.php',
|
||||
'ArcanistUnitTestResult' => 'unit/ArcanistUnitTestResult.php',
|
||||
'ArcanistUnitWorkflow' => 'workflow/ArcanistUnitWorkflow.php',
|
||||
'ArcanistUpgradeWorkflow' => 'workflow/ArcanistUpgradeWorkflow.php',
|
||||
|
@ -183,6 +184,7 @@ phutil_register_library_map(array(
|
|||
'ArcanistUserAbortException' => 'exception/usage/ArcanistUserAbortException.php',
|
||||
'ArcanistVersionWorkflow' => 'workflow/ArcanistVersionWorkflow.php',
|
||||
'ArcanistWhichWorkflow' => 'workflow/ArcanistWhichWorkflow.php',
|
||||
'ArcanistWorkflow' => 'workflow/ArcanistWorkflow.php',
|
||||
'ArcanistWorkingCopyIdentity' => 'workingcopyidentity/ArcanistWorkingCopyIdentity.php',
|
||||
'ArcanistXHPASTLintNamingHook' => 'lint/linter/xhpast/ArcanistXHPASTLintNamingHook.php',
|
||||
'ArcanistXHPASTLintNamingHookTestCase' => 'lint/linter/xhpast/__tests__/ArcanistXHPASTLintNamingHookTestCase.php',
|
||||
|
@ -210,69 +212,70 @@ phutil_register_library_map(array(
|
|||
),
|
||||
'function' => array(),
|
||||
'xmap' => array(
|
||||
'ArcanistAliasWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistAmendWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistAnoidWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistAliasWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistAmendWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistAnoidWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistArcanistLinterTestCase' => 'ArcanistLinterTestCase',
|
||||
'ArcanistBackoutWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistBackoutWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistBaseCommitParserTestCase' => 'ArcanistTestCase',
|
||||
'ArcanistBaseWorkflow' => 'Phobject',
|
||||
'ArcanistBaseUnitTestEngine' => 'ArcanistUnitTestEngine',
|
||||
'ArcanistBaseWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistBaseXHPASTLinter' => 'ArcanistFutureLinter',
|
||||
'ArcanistBookmarkWorkflow' => 'ArcanistFeatureWorkflow',
|
||||
'ArcanistBranchWorkflow' => 'ArcanistFeatureWorkflow',
|
||||
'ArcanistBritishTestCase' => 'ArcanistTestCase',
|
||||
'ArcanistBrowseWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistBrowseWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistBundleTestCase' => 'ArcanistTestCase',
|
||||
'ArcanistCSSLintLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistCSSLintLinterTestCase' => 'ArcanistArcanistLinterTestCase',
|
||||
'ArcanistCSharpLinter' => 'ArcanistLinter',
|
||||
'ArcanistCallConduitWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistCallConduitWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistCapabilityNotSupportedException' => 'Exception',
|
||||
'ArcanistChmodLinter' => 'ArcanistLinter',
|
||||
'ArcanistChooseInvalidRevisionException' => 'Exception',
|
||||
'ArcanistChooseNoRevisionsException' => 'Exception',
|
||||
'ArcanistCloseRevisionWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistCloseWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistCloseRevisionWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistCloseWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistClosureLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistClosureLinterTestCase' => 'ArcanistArcanistLinterTestCase',
|
||||
'ArcanistCoffeeLintLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistCoffeeLintLinterTestCase' => 'ArcanistArcanistLinterTestCase',
|
||||
'ArcanistCommentRemoverTestCase' => 'ArcanistTestCase',
|
||||
'ArcanistCommitWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistCommitWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistConduitLinter' => 'ArcanistLinter',
|
||||
'ArcanistConfigurationDrivenLintEngine' => 'ArcanistLintEngine',
|
||||
'ArcanistCoverWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistCoverWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistCppcheckLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistCppcheckLinterTestCase' => 'ArcanistArcanistLinterTestCase',
|
||||
'ArcanistCpplintLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistCpplintLinterTestCase' => 'ArcanistArcanistLinterTestCase',
|
||||
'ArcanistDiffParserTestCase' => 'ArcanistTestCase',
|
||||
'ArcanistDiffUtilsTestCase' => 'ArcanistTestCase',
|
||||
'ArcanistDiffWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistDiffWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistDifferentialCommitMessageParserException' => 'Exception',
|
||||
'ArcanistDifferentialDependencyGraph' => 'AbstractDirectedGraph',
|
||||
'ArcanistDownloadWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistDownloadWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistEventType' => 'PhutilEventType',
|
||||
'ArcanistExportWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistExportWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistExternalLinter' => 'ArcanistFutureLinter',
|
||||
'ArcanistFeatureWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistFeatureWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistFilenameLinter' => 'ArcanistLinter',
|
||||
'ArcanistFlagWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistFlagWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistFlake8Linter' => 'ArcanistExternalLinter',
|
||||
'ArcanistFlake8LinterTestCase' => 'ArcanistArcanistLinterTestCase',
|
||||
'ArcanistFutureLinter' => 'ArcanistLinter',
|
||||
'ArcanistGeneratedLinter' => 'ArcanistLinter',
|
||||
'ArcanistGetConfigWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistGetConfigWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistGitAPI' => 'ArcanistRepositoryAPI',
|
||||
'ArcanistGitHookPreReceiveWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistGitHookPreReceiveWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistGoLintLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistGoLintLinterTestCase' => 'ArcanistArcanistLinterTestCase',
|
||||
'ArcanistHelpWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistHelpWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistHgClientChannel' => 'PhutilProtocolChannel',
|
||||
'ArcanistHgServerChannel' => 'PhutilProtocolChannel',
|
||||
'ArcanistInfrastructureTestCase' => 'ArcanistTestCase',
|
||||
'ArcanistInlinesWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistInstallCertificateWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistInlinesWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistInstallCertificateWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistJSHintLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistJSHintLinterTestCase' => 'ArcanistArcanistLinterTestCase',
|
||||
'ArcanistJSONLintLinter' => 'ArcanistExternalLinter',
|
||||
|
@ -281,20 +284,20 @@ phutil_register_library_map(array(
|
|||
'ArcanistJSONLinterTestCase' => 'ArcanistArcanistLinterTestCase',
|
||||
'ArcanistJscsLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistJscsLinterTestCase' => 'ArcanistArcanistLinterTestCase',
|
||||
'ArcanistLandWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistLandWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistLesscLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistLesscLinterTestCase' => 'ArcanistArcanistLinterTestCase',
|
||||
'ArcanistLiberateWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistLiberateWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistLintCheckstyleXMLRenderer' => 'ArcanistLintRenderer',
|
||||
'ArcanistLintConsoleRenderer' => 'ArcanistLintRenderer',
|
||||
'ArcanistLintJSONRenderer' => 'ArcanistLintRenderer',
|
||||
'ArcanistLintLikeCompilerRenderer' => 'ArcanistLintRenderer',
|
||||
'ArcanistLintNoneRenderer' => 'ArcanistLintRenderer',
|
||||
'ArcanistLintSummaryRenderer' => 'ArcanistLintRenderer',
|
||||
'ArcanistLintWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistLintWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistLinterTestCase' => 'ArcanistPhutilTestCase',
|
||||
'ArcanistLintersWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistListWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistLintersWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistListWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistMercurialAPI' => 'ArcanistRepositoryAPI',
|
||||
'ArcanistMercurialParserTestCase' => 'ArcanistTestCase',
|
||||
'ArcanistMergeConflictLinter' => 'ArcanistLinter',
|
||||
|
@ -306,10 +309,10 @@ phutil_register_library_map(array(
|
|||
'ArcanistPEP8Linter' => 'ArcanistExternalLinter',
|
||||
'ArcanistPEP8LinterTestCase' => 'ArcanistArcanistLinterTestCase',
|
||||
'ArcanistPHPCSLinterTestCase' => 'ArcanistArcanistLinterTestCase',
|
||||
'ArcanistPasteWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistPatchWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistPasteWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistPatchWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistPhpcsLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistPhrequentWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistPhrequentWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistPhutilLibraryLinter' => 'ArcanistLinter',
|
||||
'ArcanistPhutilTestCaseTestCase' => 'ArcanistPhutilTestCase',
|
||||
'ArcanistPhutilTestSkippedException' => 'Exception',
|
||||
|
@ -324,12 +327,12 @@ phutil_register_library_map(array(
|
|||
'ArcanistPyLintLinterTestCase' => 'ArcanistArcanistLinterTestCase',
|
||||
'ArcanistRepositoryAPIMiscTestCase' => 'ArcanistTestCase',
|
||||
'ArcanistRepositoryAPIStateTestCase' => 'ArcanistTestCase',
|
||||
'ArcanistRevertWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistRevertWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistRubyLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistRubyLinterTestCase' => 'ArcanistArcanistLinterTestCase',
|
||||
'ArcanistScriptAndRegexLinter' => 'ArcanistLinter',
|
||||
'ArcanistSetConfigWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistShellCompleteWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistSetConfigWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistShellCompleteWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistSingleLintEngine' => 'ArcanistLintEngine',
|
||||
'ArcanistSpellingLinter' => 'ArcanistLinter',
|
||||
'ArcanistSpellingLinterTestCase' => 'ArcanistArcanistLinterTestCase',
|
||||
|
@ -337,22 +340,23 @@ phutil_register_library_map(array(
|
|||
'ArcanistStopWorkflow' => 'ArcanistPhrequentWorkflow',
|
||||
'ArcanistSubversionAPI' => 'ArcanistRepositoryAPI',
|
||||
'ArcanistSubversionHookAPI' => 'ArcanistHookAPI',
|
||||
'ArcanistSvnHookPreCommitWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistTasksWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistSvnHookPreCommitWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistTasksWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistTestCase' => 'ArcanistPhutilTestCase',
|
||||
'ArcanistTextLinter' => 'ArcanistLinter',
|
||||
'ArcanistTextLinterTestCase' => 'ArcanistArcanistLinterTestCase',
|
||||
'ArcanistTimeWorkflow' => 'ArcanistPhrequentWorkflow',
|
||||
'ArcanistTodoWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistTodoWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistUncommittedChangesException' => 'ArcanistUsageException',
|
||||
'ArcanistUnitConsoleRenderer' => 'ArcanistUnitRenderer',
|
||||
'ArcanistUnitWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistUpgradeWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistUploadWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistUnitWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistUpgradeWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistUploadWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistUsageException' => 'Exception',
|
||||
'ArcanistUserAbortException' => 'ArcanistUsageException',
|
||||
'ArcanistVersionWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistWhichWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistVersionWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistWhichWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistWorkflow' => 'Phobject',
|
||||
'ArcanistXHPASTLintNamingHookTestCase' => 'ArcanistTestCase',
|
||||
'ArcanistXHPASTLintTestSwitchHook' => 'ArcanistXHPASTLintSwitchHook',
|
||||
'ArcanistXHPASTLinter' => 'ArcanistBaseXHPASTLinter',
|
||||
|
@ -361,17 +365,17 @@ phutil_register_library_map(array(
|
|||
'ArcanistXMLLinterTestCase' => 'ArcanistArcanistLinterTestCase',
|
||||
'CSharpToolsTestEngine' => 'XUnitTestEngine',
|
||||
'ComprehensiveLintEngine' => 'ArcanistLintEngine',
|
||||
'GoTestResultParser' => 'ArcanistBaseTestResultParser',
|
||||
'GoTestResultParser' => 'ArcanistTestResultParser',
|
||||
'GoTestResultParserTestCase' => 'ArcanistTestCase',
|
||||
'NoseTestEngine' => 'ArcanistBaseUnitTestEngine',
|
||||
'NoseTestEngine' => 'ArcanistUnitTestEngine',
|
||||
'PHPUnitTestEngineTestCase' => 'ArcanistTestCase',
|
||||
'PhpunitResultParser' => 'ArcanistBaseTestResultParser',
|
||||
'PhpunitTestEngine' => 'ArcanistBaseUnitTestEngine',
|
||||
'PhutilUnitTestEngine' => 'ArcanistBaseUnitTestEngine',
|
||||
'PhpunitResultParser' => 'ArcanistTestResultParser',
|
||||
'PhpunitTestEngine' => 'ArcanistUnitTestEngine',
|
||||
'PhutilUnitTestEngine' => 'ArcanistUnitTestEngine',
|
||||
'PhutilUnitTestEngineTestCase' => 'ArcanistTestCase',
|
||||
'PytestTestEngine' => 'ArcanistBaseUnitTestEngine',
|
||||
'PytestTestEngine' => 'ArcanistUnitTestEngine',
|
||||
'UnitTestableArcanistLintEngine' => 'ArcanistLintEngine',
|
||||
'XUnitTestEngine' => 'ArcanistBaseUnitTestEngine',
|
||||
'XUnitTestEngine' => 'ArcanistUnitTestEngine',
|
||||
'XUnitTestResultParserTestCase' => 'ArcanistTestCase',
|
||||
),
|
||||
));
|
||||
|
|
|
@ -38,7 +38,7 @@ class ArcanistConfiguration {
|
|||
$workflows_by_name = array();
|
||||
|
||||
$workflows_by_class_name = id(new PhutilSymbolLoader())
|
||||
->setAncestorClass('ArcanistBaseWorkflow')
|
||||
->setAncestorClass('ArcanistWorkflow')
|
||||
->loadObjects();
|
||||
foreach ($workflows_by_class_name as $class => $workflow) {
|
||||
$name = $workflow->getWorkflowName();
|
||||
|
@ -60,14 +60,11 @@ class ArcanistConfiguration {
|
|||
return (bool)$this->buildWorkflow($workflow);
|
||||
}
|
||||
|
||||
public function willRunWorkflow($command, ArcanistBaseWorkflow $workflow) {
|
||||
public function willRunWorkflow($command, ArcanistWorkflow $workflow) {
|
||||
// This is a hook.
|
||||
}
|
||||
|
||||
public function didRunWorkflow(
|
||||
$command,
|
||||
ArcanistBaseWorkflow $workflow,
|
||||
$err) {
|
||||
public function didRunWorkflow($command, ArcanistWorkflow $workflow, $err) {
|
||||
|
||||
// This is a hook.
|
||||
}
|
||||
|
|
|
@ -1,115 +1,7 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Manages unit test execution.
|
||||
* NOTE: Do not extend from this class, extend from
|
||||
* @{class:ArcanistUnitTestEngine} instead.
|
||||
*/
|
||||
abstract class ArcanistBaseUnitTestEngine {
|
||||
|
||||
private $workingCopy;
|
||||
private $paths;
|
||||
private $arguments = array();
|
||||
protected $diffID;
|
||||
private $enableAsyncTests;
|
||||
private $enableCoverage;
|
||||
private $runAllTests;
|
||||
protected $renderer;
|
||||
|
||||
|
||||
public function setRunAllTests($run_all_tests) {
|
||||
if (!$this->supportsRunAllTests() && $run_all_tests) {
|
||||
$class = get_class($this);
|
||||
throw new Exception(
|
||||
"Engine '{$class}' does not support --everything.");
|
||||
}
|
||||
|
||||
$this->runAllTests = $run_all_tests;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getRunAllTests() {
|
||||
return $this->runAllTests;
|
||||
}
|
||||
|
||||
protected function supportsRunAllTests() {
|
||||
return false;
|
||||
}
|
||||
|
||||
final public function __construct() {
|
||||
|
||||
}
|
||||
|
||||
public function setConfigurationManager(
|
||||
ArcanistConfigurationManager $configuration_manager) {
|
||||
$this->configurationManager = $configuration_manager;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getConfigurationManager() {
|
||||
return $this->configurationManager;
|
||||
}
|
||||
|
||||
final public function setWorkingCopy(
|
||||
ArcanistWorkingCopyIdentity $working_copy) {
|
||||
|
||||
$this->workingCopy = $working_copy;
|
||||
return $this;
|
||||
}
|
||||
|
||||
final public function getWorkingCopy() {
|
||||
return $this->workingCopy;
|
||||
}
|
||||
|
||||
final public function setPaths(array $paths) {
|
||||
$this->paths = $paths;
|
||||
return $this;
|
||||
}
|
||||
|
||||
final public function getPaths() {
|
||||
return $this->paths;
|
||||
}
|
||||
|
||||
final public function setArguments(array $arguments) {
|
||||
$this->arguments = $arguments;
|
||||
return $this;
|
||||
}
|
||||
|
||||
final public function getArgument($key, $default = null) {
|
||||
return idx($this->arguments, $key, $default);
|
||||
}
|
||||
|
||||
final public function setEnableAsyncTests($enable_async_tests) {
|
||||
$this->enableAsyncTests = $enable_async_tests;
|
||||
return $this;
|
||||
}
|
||||
|
||||
final public function getEnableAsyncTests() {
|
||||
return $this->enableAsyncTests;
|
||||
}
|
||||
|
||||
final public function setEnableCoverage($enable_coverage) {
|
||||
$this->enableCoverage = $enable_coverage;
|
||||
return $this;
|
||||
}
|
||||
|
||||
final public function getEnableCoverage() {
|
||||
return $this->enableCoverage;
|
||||
}
|
||||
|
||||
public function setRenderer(ArcanistUnitRenderer $renderer) {
|
||||
$this->renderer = $renderer;
|
||||
return $this;
|
||||
}
|
||||
|
||||
abstract public function run();
|
||||
|
||||
/**
|
||||
* 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 been run. This
|
||||
* is the case for example when the child class prints the tests results
|
||||
* while the tests are running.
|
||||
*/
|
||||
public function shouldEchoTestResults() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
abstract class ArcanistBaseUnitTestEngine extends ArcanistUnitTestEngine {}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Abstract Base class for test result parsers.
|
||||
* Abstract base class for test result parsers.
|
||||
*/
|
||||
abstract class ArcanistBaseTestResultParser {
|
||||
abstract class ArcanistTestResultParser {
|
||||
|
||||
protected $enableCoverage;
|
||||
protected $projectRoot;
|
||||
|
@ -36,13 +36,12 @@ abstract class ArcanistBaseTestResultParser {
|
|||
}
|
||||
|
||||
/**
|
||||
* Parse test results from provided input and return an array
|
||||
* of ArcanistUnitTestResult
|
||||
* Parse test results from provided input and return an array of
|
||||
* @{class:ArcanistUnitTestResult}.
|
||||
*
|
||||
* @param string $path Path to test
|
||||
* @param string $test_results String containing test results
|
||||
*
|
||||
* @return array ArcanistUnitTestResult
|
||||
* @param string Path to test.
|
||||
* @param string String containing test results.
|
||||
* @return array
|
||||
*/
|
||||
abstract public function parseTestResults($path, $test_results);
|
||||
|
122
src/unit/engine/ArcanistUnitTestEngine.php
Normal file
122
src/unit/engine/ArcanistUnitTestEngine.php
Normal file
|
@ -0,0 +1,122 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Manages unit test execution.
|
||||
*/
|
||||
abstract class ArcanistUnitTestEngine {
|
||||
|
||||
private $workingCopy;
|
||||
private $paths;
|
||||
private $arguments = array();
|
||||
protected $diffID;
|
||||
private $enableAsyncTests;
|
||||
private $enableCoverage;
|
||||
private $runAllTests;
|
||||
protected $renderer;
|
||||
|
||||
|
||||
public function setRunAllTests($run_all_tests) {
|
||||
if (!$this->supportsRunAllTests() && $run_all_tests) {
|
||||
$class = get_class($this);
|
||||
throw new Exception(
|
||||
"Engine '{$class}' does not support --everything.");
|
||||
}
|
||||
|
||||
$this->runAllTests = $run_all_tests;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getRunAllTests() {
|
||||
return $this->runAllTests;
|
||||
}
|
||||
|
||||
protected function supportsRunAllTests() {
|
||||
return false;
|
||||
}
|
||||
|
||||
final public function __construct() {
|
||||
|
||||
}
|
||||
|
||||
public function setConfigurationManager(
|
||||
ArcanistConfigurationManager $configuration_manager) {
|
||||
$this->configurationManager = $configuration_manager;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getConfigurationManager() {
|
||||
return $this->configurationManager;
|
||||
}
|
||||
|
||||
final public function setWorkingCopy(
|
||||
ArcanistWorkingCopyIdentity $working_copy) {
|
||||
|
||||
// TODO: Remove this once ArcanistBaseUnitTestEngine is gone.
|
||||
if ($this instanceof ArcanistBaseUnitTestEngine) {
|
||||
phutil_deprecated(
|
||||
'ArcanistBaseUnitTestEngine',
|
||||
'You should extend from `ArcanistUnitTestEngine` instead.');
|
||||
}
|
||||
|
||||
$this->workingCopy = $working_copy;
|
||||
return $this;
|
||||
}
|
||||
|
||||
final public function getWorkingCopy() {
|
||||
return $this->workingCopy;
|
||||
}
|
||||
|
||||
final public function setPaths(array $paths) {
|
||||
$this->paths = $paths;
|
||||
return $this;
|
||||
}
|
||||
|
||||
final public function getPaths() {
|
||||
return $this->paths;
|
||||
}
|
||||
|
||||
final public function setArguments(array $arguments) {
|
||||
$this->arguments = $arguments;
|
||||
return $this;
|
||||
}
|
||||
|
||||
final public function getArgument($key, $default = null) {
|
||||
return idx($this->arguments, $key, $default);
|
||||
}
|
||||
|
||||
final public function setEnableAsyncTests($enable_async_tests) {
|
||||
$this->enableAsyncTests = $enable_async_tests;
|
||||
return $this;
|
||||
}
|
||||
|
||||
final public function getEnableAsyncTests() {
|
||||
return $this->enableAsyncTests;
|
||||
}
|
||||
|
||||
final public function setEnableCoverage($enable_coverage) {
|
||||
$this->enableCoverage = $enable_coverage;
|
||||
return $this;
|
||||
}
|
||||
|
||||
final public function getEnableCoverage() {
|
||||
return $this->enableCoverage;
|
||||
}
|
||||
|
||||
public function setRenderer(ArcanistUnitRenderer $renderer) {
|
||||
$this->renderer = $renderer;
|
||||
return $this;
|
||||
}
|
||||
|
||||
abstract public function run();
|
||||
|
||||
/**
|
||||
* 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 been run. This
|
||||
* is the case for example when the child class prints the tests results
|
||||
* while the tests are running.
|
||||
*/
|
||||
public function shouldEchoTestResults() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* (To generate test output, run something like: `go test -v`)
|
||||
*/
|
||||
final class GoTestResultParser extends ArcanistBaseTestResultParser {
|
||||
final class GoTestResultParser extends ArcanistTestResultParser {
|
||||
|
||||
/**
|
||||
* Parse test results from Go test report
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* Requires nose 1.1.3 for code coverage.
|
||||
*/
|
||||
final class NoseTestEngine extends ArcanistBaseUnitTestEngine {
|
||||
final class NoseTestEngine extends ArcanistUnitTestEngine {
|
||||
|
||||
public function run() {
|
||||
$paths = $this->getPaths();
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* For an example on how to integrate with your test engine, see
|
||||
* @{class:PhpunitTestEngine}.
|
||||
*/
|
||||
final class PhpunitResultParser extends ArcanistBaseTestResultParser {
|
||||
final class PhpunitResultParser extends ArcanistTestResultParser {
|
||||
|
||||
/**
|
||||
* Parse test results from phpunit json report
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* PHPUnit wrapper.
|
||||
*/
|
||||
final class PhpunitTestEngine extends ArcanistBaseUnitTestEngine {
|
||||
final class PhpunitTestEngine extends ArcanistUnitTestEngine {
|
||||
|
||||
private $configFile;
|
||||
private $phpunitBinary = 'phpunit';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Very basic unit test engine which runs libphutil tests.
|
||||
*/
|
||||
final class PhutilUnitTestEngine extends ArcanistBaseUnitTestEngine {
|
||||
final class PhutilUnitTestEngine extends ArcanistUnitTestEngine {
|
||||
|
||||
protected function supportsRunAllTests() {
|
||||
return true;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Very basic 'py.test' unit test engine wrapper.
|
||||
*/
|
||||
final class PytestTestEngine extends ArcanistBaseUnitTestEngine {
|
||||
final class PytestTestEngine extends ArcanistUnitTestEngine {
|
||||
|
||||
public function run() {
|
||||
$working_copy = $this->getWorkingCopy();
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* @concrete-extensible
|
||||
*/
|
||||
class XUnitTestEngine extends ArcanistBaseUnitTestEngine {
|
||||
class XUnitTestEngine extends ArcanistUnitTestEngine {
|
||||
|
||||
protected $runtimeEngine;
|
||||
protected $buildEngine;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Manages aliases for commands with options.
|
||||
*/
|
||||
final class ArcanistAliasWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistAliasWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'alias';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Synchronizes commit messages from Differential.
|
||||
*/
|
||||
final class ArcanistAmendWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistAmendWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'amend';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistAnoidWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistAnoidWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'anoid';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Runs git revert and assigns a high priority task to original author.
|
||||
*/
|
||||
final class ArcanistBackoutWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistBackoutWorkflow extends ArcanistWorkflow {
|
||||
|
||||
private $console;
|
||||
private $conduit;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Browse files in the Diffusion web interface.
|
||||
*/
|
||||
final class ArcanistBrowseWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistBrowseWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'browse';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Provides command-line access to the Conduit API.
|
||||
*/
|
||||
final class ArcanistCallConduitWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistCallConduitWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'call-conduit';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Explicitly closes Differential revisions.
|
||||
*/
|
||||
final class ArcanistCloseRevisionWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistCloseRevisionWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'close-revision';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Close a task.
|
||||
*/
|
||||
final class ArcanistCloseWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistCloseWorkflow extends ArcanistWorkflow {
|
||||
|
||||
private $tasks;
|
||||
private $statusOptions;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Executes "svn commit" once a revision has been "Accepted".
|
||||
*/
|
||||
final class ArcanistCommitWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistCommitWorkflow extends ArcanistWorkflow {
|
||||
|
||||
private $revisionID;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Covers your professional reputation by blaming changes to locate reviewers.
|
||||
*/
|
||||
final class ArcanistCoverWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistCoverWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'cover';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @task diffspec Diff Specification
|
||||
* @task diffprop Diff Properties
|
||||
*/
|
||||
final class ArcanistDiffWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistDiffWorkflow extends ArcanistWorkflow {
|
||||
|
||||
private $console;
|
||||
private $hasWarnedExternals = false;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Download a file from Phabricator.
|
||||
*/
|
||||
final class ArcanistDownloadWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistDownloadWorkflow extends ArcanistWorkflow {
|
||||
|
||||
private $id;
|
||||
private $saveAs;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Exports changes from Differential or the working copy to a file.
|
||||
*/
|
||||
final class ArcanistExportWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistExportWorkflow extends ArcanistWorkflow {
|
||||
|
||||
const SOURCE_LOCAL = 'local';
|
||||
const SOURCE_DIFF = 'diff';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @concrete-extensible
|
||||
*/
|
||||
class ArcanistFeatureWorkflow extends ArcanistBaseWorkflow {
|
||||
class ArcanistFeatureWorkflow extends ArcanistWorkflow {
|
||||
|
||||
private $branches;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistFlagWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistFlagWorkflow extends ArcanistWorkflow {
|
||||
|
||||
private static $colorMap = array(
|
||||
0 => 'red', // Red
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Read configuration settings.
|
||||
*/
|
||||
final class ArcanistGetConfigWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistGetConfigWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'get-config';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Installable as a git pre-receive hook.
|
||||
*/
|
||||
final class ArcanistGitHookPreReceiveWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistGitHookPreReceiveWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'git-hook-pre-receive';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Seduces the reader with majestic prose.
|
||||
*/
|
||||
final class ArcanistHelpWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistHelpWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'help';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistInlinesWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistInlinesWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'inlines';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Installs arcanist certificates.
|
||||
*/
|
||||
final class ArcanistInstallCertificateWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistInstallCertificateWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'install-certificate';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Lands a branch by rebasing, merging and amending it.
|
||||
*/
|
||||
final class ArcanistLandWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistLandWorkflow extends ArcanistWorkflow {
|
||||
|
||||
private $isGit;
|
||||
private $isGitSvn;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* definition it had when it first loaded. This is normally fine, but
|
||||
* problematic in this case because `arc liberate` modifies library definitions.
|
||||
*/
|
||||
final class ArcanistLiberateWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistLiberateWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'liberate';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Runs lint rules on changes.
|
||||
*/
|
||||
final class ArcanistLintWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistLintWorkflow extends ArcanistWorkflow {
|
||||
|
||||
const RESULT_OKAY = 0;
|
||||
const RESULT_WARNINGS = 1;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* List available linters.
|
||||
*/
|
||||
final class ArcanistLintersWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistLintersWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'linters';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Lists open revisions in Differential.
|
||||
*/
|
||||
final class ArcanistListWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistListWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'list';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Upload a chunk of text to the Paste application, or download one.
|
||||
*/
|
||||
final class ArcanistPasteWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistPasteWorkflow extends ArcanistWorkflow {
|
||||
|
||||
private $id;
|
||||
private $language;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Applies changes from Differential or a file to the working copy.
|
||||
*/
|
||||
final class ArcanistPatchWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistPatchWorkflow extends ArcanistWorkflow {
|
||||
|
||||
const SOURCE_BUNDLE = 'bundle';
|
||||
const SOURCE_PATCH = 'patch';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Base workflow for Phrequent workflows
|
||||
*/
|
||||
abstract class ArcanistPhrequentWorkflow extends ArcanistBaseWorkflow {
|
||||
abstract class ArcanistPhrequentWorkflow extends ArcanistWorkflow {
|
||||
|
||||
protected function printCurrentTracking() {
|
||||
$conduit = $this->getConduit();
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Redirects to `arc backout` workflow.
|
||||
*/
|
||||
final class ArcanistRevertWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistRevertWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'revert';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Write configuration settings.
|
||||
*/
|
||||
final class ArcanistSetConfigWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistSetConfigWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'set-config';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Powers shell-completion scripts.
|
||||
*/
|
||||
final class ArcanistShellCompleteWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistShellCompleteWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'shell-complete';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Installable as an SVN "pre-commit" hook.
|
||||
*/
|
||||
final class ArcanistSvnHookPreCommitWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistSvnHookPreCommitWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'svn-hook-pre-commit';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Displays User Tasks.
|
||||
*/
|
||||
final class ArcanistTasksWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistTasksWorkflow extends ArcanistWorkflow {
|
||||
|
||||
private $tasks;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Quickly create a task.
|
||||
*/
|
||||
final class ArcanistTodoWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistTodoWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'todo';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Runs unit tests which cover your changes.
|
||||
*/
|
||||
final class ArcanistUnitWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistUnitWorkflow extends ArcanistWorkflow {
|
||||
|
||||
const RESULT_OKAY = 0;
|
||||
const RESULT_UNSOUND = 1;
|
||||
|
@ -133,10 +133,10 @@ EOTEXT
|
|||
$paths = $this->selectPathsForWorkflow($paths, $rev);
|
||||
|
||||
if (!class_exists($engine_class) ||
|
||||
!is_subclass_of($engine_class, 'ArcanistBaseUnitTestEngine')) {
|
||||
!is_subclass_of($engine_class, 'ArcanistUnitTestEngine')) {
|
||||
throw new ArcanistUsageException(
|
||||
"Configured unit test engine '{$engine_class}' is not a subclass of ".
|
||||
"'ArcanistBaseUnitTestEngine'.");
|
||||
"'ArcanistUnitTestEngine'.");
|
||||
}
|
||||
|
||||
$this->engine = newv($engine_class, array());
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Upgrade arcanist itself.
|
||||
*/
|
||||
final class ArcanistUpgradeWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistUpgradeWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'upgrade';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Upload a file to Phabricator.
|
||||
*/
|
||||
final class ArcanistUploadWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistUploadWorkflow extends ArcanistWorkflow {
|
||||
|
||||
private $paths;
|
||||
private $json;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Display the current version of Arcanist.
|
||||
*/
|
||||
final class ArcanistVersionWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistVersionWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'version';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* Show which revision or revisions are in the working copy.
|
||||
*/
|
||||
final class ArcanistWhichWorkflow extends ArcanistBaseWorkflow {
|
||||
final class ArcanistWhichWorkflow extends ArcanistWorkflow {
|
||||
|
||||
public function getWorkflowName() {
|
||||
return 'which';
|
||||
|
|
1798
src/workflow/ArcanistWorkflow.php
Normal file
1798
src/workflow/ArcanistWorkflow.php
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue