Changeset View
Changeset View
Standalone View
Standalone View
src/unit/engine/CSharpToolsTestEngine.php
| Show All 31 Lines | protected function loadEnvironment() { | ||||
| if ($this->getEnableCoverage() === false) { | if ($this->getEnableCoverage() === false) { | ||||
| return; | return; | ||||
| } | } | ||||
| // Determine coverage path. | // Determine coverage path. | ||||
| if ($this->cscoverHintPath === null) { | if ($this->cscoverHintPath === null) { | ||||
| throw new Exception( | throw new Exception( | ||||
| "Unable to locate cscover. Configure it with ". | pht( | ||||
| "the `unit.csharp.coverage.binary' option in .arcconfig"); | "Unable to locate %s. Configure it with the '%s' option in %s.", | ||||
| 'cscover', | |||||
| 'unit.csharp.coverage.binary', | |||||
| '.arcconfig')); | |||||
| } | } | ||||
| $cscover = $this->projectRoot.DIRECTORY_SEPARATOR.$this->cscoverHintPath; | $cscover = $this->projectRoot.DIRECTORY_SEPARATOR.$this->cscoverHintPath; | ||||
| if (file_exists($cscover)) { | if (file_exists($cscover)) { | ||||
| $this->coverEngine = Filesystem::resolvePath($cscover); | $this->coverEngine = Filesystem::resolvePath($cscover); | ||||
| } else { | } else { | ||||
| throw new Exception( | throw new Exception( | ||||
| 'Unable to locate cscover coverage runner (have you built yet?)'); | pht( | ||||
| 'Unable to locate %s coverage runner (have you built yet?)', | |||||
| 'cscover')); | |||||
| } | } | ||||
| } | } | ||||
| /** | /** | ||||
| * Returns whether the specified assembly should be instrumented for | * Returns whether the specified assembly should be instrumented for | ||||
| * code coverage reporting. Checks the excluded file list and the | * code coverage reporting. Checks the excluded file list and the | ||||
| * matching regex if they are configured. | * matching regex if they are configured. | ||||
| * | * | ||||
| ▲ Show 20 Lines • Show All 226 Lines • Show Last 20 Lines | |||||