2013-01-28 02:16:50 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Abstract Base class for test result parsers
|
|
|
|
*/
|
|
|
|
abstract class ArcanistBaseTestResultParser {
|
|
|
|
|
|
|
|
protected $enableCoverage;
|
|
|
|
protected $projectRoot;
|
2013-10-20 16:41:48 +02:00
|
|
|
protected $coverageFile;
|
2013-01-28 02:16:50 +01:00
|
|
|
|
|
|
|
public function setEnableCoverage($enable_coverage) {
|
|
|
|
$this->enableCoverage = $enable_coverage;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setProjectRoot($project_root) {
|
|
|
|
$this->projectRoot = $project_root;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setCoverageFile($coverage_file) {
|
|
|
|
$this->coverageFile = $coverage_file;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setAffectedTests($affected_tests) {
|
|
|
|
$this->affectedTests = $affected_tests;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Parse test results from provided input and return an array
|
|
|
|
* of ArcanistUnitTestResult
|
|
|
|
*
|
|
|
|
* @param string $path Path to test
|
|
|
|
* @param string $test_results String containing test results
|
|
|
|
*
|
|
|
|
* @return array ArcanistUnitTestResult
|
|
|
|
*/
|
|
|
|
abstract public function parseTestResults($path, $test_results);
|
|
|
|
}
|