diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 5a141d0b..8f4309a5 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -84,6 +84,8 @@ phutil_register_library_map(array( 'ArcanistGitHookPreReceiveWorkflow' => 'workflow/ArcanistGitHookPreReceiveWorkflow.php', 'ArcanistGoLintLinter' => 'lint/linter/ArcanistGoLintLinter.php', 'ArcanistGoLintLinterTestCase' => 'lint/linter/__tests__/ArcanistGoLintLinterTestCase.php', + 'ArcanistGoTestResultParser' => 'unit/engine/ArcanistGoTestResultParser.php', + 'ArcanistGoTestResultParserTestCase' => 'unit/engine/__tests__/ArcanistGoTestResultParserTestCase.php', 'ArcanistHLintLinter' => 'lint/linter/ArcanistHLintLinter.php', 'ArcanistHLintLinterTestCase' => 'lint/linter/__tests__/ArcanistHLintLinterTestCase.php', 'ArcanistHelpWorkflow' => 'workflow/ArcanistHelpWorkflow.php', @@ -136,6 +138,7 @@ phutil_register_library_map(array( 'ArcanistPhpLinterTestCase' => 'lint/linter/__tests__/ArcanistPhpLinterTestCase.php', 'ArcanistPhpcsLinter' => 'lint/linter/ArcanistPhpcsLinter.php', 'ArcanistPhpcsLinterTestCase' => 'lint/linter/__tests__/ArcanistPhpcsLinterTestCase.php', + 'ArcanistPhpunitTestResultParser' => 'unit/engine/ArcanistPhpunitTestResultParser.php', 'ArcanistPhrequentWorkflow' => 'workflow/ArcanistPhrequentWorkflow.php', 'ArcanistPhutilLibraryLinter' => 'lint/linter/ArcanistPhutilLibraryLinter.php', 'ArcanistPhutilTestCase' => 'unit/engine/phutil/ArcanistPhutilTestCase.php', @@ -202,11 +205,8 @@ phutil_register_library_map(array( 'ArcanistXUnitTestResultParser' => 'unit/engine/ArcanistXUnitTestResultParser.php', 'CSharpToolsTestEngine' => 'unit/engine/CSharpToolsTestEngine.php', 'ComprehensiveLintEngine' => 'lint/engine/ComprehensiveLintEngine.php', - 'GoTestResultParser' => 'unit/engine/GoTestResultParser.php', - 'GoTestResultParserTestCase' => 'unit/engine/__tests__/GoTestResultParserTestCase.php', 'NoseTestEngine' => 'unit/engine/NoseTestEngine.php', 'PHPUnitTestEngineTestCase' => 'unit/engine/__tests__/PHPUnitTestEngineTestCase.php', - 'PhpunitResultParser' => 'unit/engine/PhpunitResultParser.php', 'PhpunitTestEngine' => 'unit/engine/PhpunitTestEngine.php', 'PhutilUnitTestEngine' => 'unit/engine/PhutilUnitTestEngine.php', 'PhutilUnitTestEngineTestCase' => 'unit/engine/__tests__/PhutilUnitTestEngineTestCase.php', @@ -278,6 +278,8 @@ phutil_register_library_map(array( 'ArcanistGitHookPreReceiveWorkflow' => 'ArcanistWorkflow', 'ArcanistGoLintLinter' => 'ArcanistExternalLinter', 'ArcanistGoLintLinterTestCase' => 'ArcanistExternalLinterTestCase', + 'ArcanistGoTestResultParser' => 'ArcanistTestResultParser', + 'ArcanistGoTestResultParserTestCase' => 'ArcanistTestCase', 'ArcanistHLintLinter' => 'ArcanistExternalLinter', 'ArcanistHLintLinterTestCase' => 'ArcanistExternalLinterTestCase', 'ArcanistHelpWorkflow' => 'ArcanistWorkflow', @@ -319,6 +321,7 @@ phutil_register_library_map(array( 'ArcanistPhpLinterTestCase' => 'ArcanistExternalLinterTestCase', 'ArcanistPhpcsLinter' => 'ArcanistExternalLinter', 'ArcanistPhpcsLinterTestCase' => 'ArcanistExternalLinterTestCase', + 'ArcanistPhpunitTestResultParser' => 'ArcanistTestResultParser', 'ArcanistPhrequentWorkflow' => 'ArcanistWorkflow', 'ArcanistPhutilLibraryLinter' => 'ArcanistLinter', 'ArcanistPhutilTestCaseTestCase' => 'ArcanistPhutilTestCase', @@ -374,11 +377,8 @@ phutil_register_library_map(array( 'ArcanistXMLLinterTestCase' => 'ArcanistArcanistLinterTestCase', 'CSharpToolsTestEngine' => 'XUnitTestEngine', 'ComprehensiveLintEngine' => 'ArcanistLintEngine', - 'GoTestResultParser' => 'ArcanistTestResultParser', - 'GoTestResultParserTestCase' => 'ArcanistTestCase', 'NoseTestEngine' => 'ArcanistUnitTestEngine', 'PHPUnitTestEngineTestCase' => 'ArcanistTestCase', - 'PhpunitResultParser' => 'ArcanistTestResultParser', 'PhpunitTestEngine' => 'ArcanistUnitTestEngine', 'PhutilUnitTestEngine' => 'ArcanistUnitTestEngine', 'PhutilUnitTestEngineTestCase' => 'ArcanistTestCase', diff --git a/src/unit/engine/GoTestResultParser.php b/src/unit/engine/ArcanistGoTestResultParser.php similarity index 98% rename from src/unit/engine/GoTestResultParser.php rename to src/unit/engine/ArcanistGoTestResultParser.php index 017e700d..c5729416 100644 --- a/src/unit/engine/GoTestResultParser.php +++ b/src/unit/engine/ArcanistGoTestResultParser.php @@ -5,7 +5,7 @@ * * (To generate test output, run something like: `go test -v`) */ -final class GoTestResultParser extends ArcanistTestResultParser { +final class ArcanistGoTestResultParser extends ArcanistTestResultParser { /** * Parse test results from Go test report diff --git a/src/unit/engine/PhpunitResultParser.php b/src/unit/engine/ArcanistPhpunitTestResultParser.php similarity index 98% rename from src/unit/engine/PhpunitResultParser.php rename to src/unit/engine/ArcanistPhpunitTestResultParser.php index 693d8bcc..ff06a627 100644 --- a/src/unit/engine/PhpunitResultParser.php +++ b/src/unit/engine/ArcanistPhpunitTestResultParser.php @@ -6,7 +6,7 @@ * For an example on how to integrate with your test engine, see * @{class:PhpunitTestEngine}. */ -final class PhpunitResultParser extends ArcanistTestResultParser { +final class ArcanistPhpunitTestResultParser extends ArcanistTestResultParser { /** * Parse test results from phpunit json report diff --git a/src/unit/engine/PhpunitTestEngine.php b/src/unit/engine/PhpunitTestEngine.php index ca541783..eb545fb1 100644 --- a/src/unit/engine/PhpunitTestEngine.php +++ b/src/unit/engine/PhpunitTestEngine.php @@ -101,7 +101,7 @@ final class PhpunitTestEngine extends ArcanistUnitTestEngine { */ private function parseTestResults($path, $json_tmp, $clover_tmp, $stderr) { $test_results = Filesystem::readFile($json_tmp); - return id(new PhpunitResultParser()) + return id(new ArcanistPhpunitTestResultParser()) ->setEnableCoverage($this->getEnableCoverage()) ->setProjectRoot($this->projectRoot) ->setCoverageFile($clover_tmp) diff --git a/src/unit/engine/__tests__/GoTestResultParserTestCase.php b/src/unit/engine/__tests__/ArcanistGoTestResultParserTestCase.php similarity index 88% rename from src/unit/engine/__tests__/GoTestResultParserTestCase.php rename to src/unit/engine/__tests__/ArcanistGoTestResultParserTestCase.php index ace64a68..abf62108 100644 --- a/src/unit/engine/__tests__/GoTestResultParserTestCase.php +++ b/src/unit/engine/__tests__/ArcanistGoTestResultParserTestCase.php @@ -1,15 +1,15 @@ parseTestResults('subpackage_test.go', $stubbed_results); $this->assertEqual(2, count($parsed_results)); @@ -27,7 +27,7 @@ final class GoTestResultParserTestCase extends ArcanistTestCase { $stubbed_results = Filesystem::readFile( dirname(__FILE__).'/testresults/go.single-test-case-failure'); - $parsed_results = id(new GoTestResultParser()) + $parsed_results = id(new ArcanistGoTestResultParser()) ->parseTestResults('subpackage_test.go', $stubbed_results); $this->assertEqual(2, count($parsed_results)); @@ -43,7 +43,7 @@ final class GoTestResultParserTestCase extends ArcanistTestCase { $stubbed_results = Filesystem::readFile( dirname(__FILE__).'/testresults/go.multiple-test-cases-successful'); - $parsed_results = id(new GoTestResultParser()) + $parsed_results = id(new ArcanistGoTestResultParser()) ->parseTestResults('package', $stubbed_results); $this->assertEqual(3, count($parsed_results)); @@ -64,7 +64,7 @@ final class GoTestResultParserTestCase extends ArcanistTestCase { $stubbed_results = Filesystem::readFile( dirname(__FILE__).'/testresults/go.multiple-test-cases-failure'); - $parsed_results = id(new GoTestResultParser()) + $parsed_results = id(new ArcanistGoTestResultParser()) ->parseTestResults('package', $stubbed_results); $this->assertEqual(3, count($parsed_results)); @@ -86,7 +86,7 @@ final class GoTestResultParserTestCase extends ArcanistTestCase { $stubbed_results = Filesystem::readFile( dirname(__FILE__).'/testresults/go.nonverbose'); - $parsed_results = id(new GoTestResultParser()) + $parsed_results = id(new ArcanistGoTestResultParser()) ->parseTestResults('package', $stubbed_results); $this->assertEqual(2, count($parsed_results));