Page MenuHomePhabricator

D7381.diff
No OneTemporary

D7381.diff

Index: src/unit/engine/ArcanistBaseUnitTestEngine.php
===================================================================
--- src/unit/engine/ArcanistBaseUnitTestEngine.php
+++ src/unit/engine/ArcanistBaseUnitTestEngine.php
@@ -40,6 +40,16 @@
}
+ 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) {
Index: src/unit/engine/CSharpToolsTestEngine.php
===================================================================
--- src/unit/engine/CSharpToolsTestEngine.php
+++ src/unit/engine/CSharpToolsTestEngine.php
@@ -26,11 +26,15 @@
protected function loadEnvironment(
$config_item = 'unit.csharp.xunit.binary') {
- $working = $this->getWorkingCopy();
- $this->xunitHintPath = $working->getConfig('unit.csharp.xunit.binary');
- $this->cscoverHintPath = $working->getConfig('unit.csharp.cscover.binary');
- $this->matchRegex = $working->getConfig('unit.csharp.coverage.match');
- $this->excludedFiles = $working->getConfig('unit.csharp.coverage.excluded');
+ $config = $this->getConfigurationManager();
+ $this->xunitHintPath =
+ $config->getConfigFromAnySource('unit.csharp.xunit.binary');
+ $this->cscoverHintPath =
+ $config->getConfigFromAnySource('unit.csharp.cscover.binary');
+ $this->matchRegex =
+ $config->getConfigFromAnySource('unit.csharp.coverage.match');
+ $this->excludedFiles =
+ $config->getConfigFromAnySource('unit.csharp.coverage.excluded');
parent::loadEnvironment($config_item);
Index: src/unit/engine/PhpunitTestEngine.php
===================================================================
--- src/unit/engine/PhpunitTestEngine.php
+++ src/unit/engine/PhpunitTestEngine.php
@@ -257,8 +257,10 @@
*/
private function prepareConfigFile() {
$project_root = $this->projectRoot . DIRECTORY_SEPARATOR;
+ $config = $this->getConfigurationManager()->getConfigFromAnySource(
+ 'phpunit_config');
- if ($config = $this->getWorkingCopy()->getConfig('phpunit_config')) {
+ if ($config) {
if (Filesystem::pathExists($project_root . $config)) {
$this->configFile = $project_root . $config;
} else {
@@ -266,7 +268,9 @@
'found in ' . $project_root . $config);
}
}
- if ($bin = $this->getWorkingCopy()->getConfig('unit.phpunit.binary')) {
+ $bin = $this->getConfigurationManager()->getConfigFromAnySource(
+ 'unit.phpunit.binary');
+ if ($bin) {
if (Filesystem::binaryExists($bin)) {
$this->phpunitBinary = $bin;
}
Index: src/unit/engine/XUnitTestEngine.php
===================================================================
--- src/unit/engine/XUnitTestEngine.php
+++ src/unit/engine/XUnitTestEngine.php
@@ -56,8 +56,9 @@
// Determine xUnit test runner path.
if ($this->xunitHintPath === null) {
- $this->xunitHintPath = $this->getWorkingCopy()->getConfig(
- 'unit.xunit.binary');
+ $this->xunitHintPath =
+ $this->getConfigurationManager()->getConfigFromAnySource(
+ 'unit.xunit.binary');
}
if ($this->xunitHintPath === null) {
}
Index: src/workflow/ArcanistUnitWorkflow.php
===================================================================
--- src/workflow/ArcanistUnitWorkflow.php
+++ src/workflow/ArcanistUnitWorkflow.php
@@ -143,6 +143,7 @@
$this->engine = newv($engine_class, array());
$this->engine->setWorkingCopy($working_copy);
+ $this->engine->setConfigurationManager($this->getConfigurationManager());
if ($everything) {
$this->engine->setRunAllTests(true);
} else {

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 30, 10:06 AM (21 h, 25 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6808728
Default Alt Text
D7381.diff (3 KB)

Event Timeline