diff --git a/build.properties.dev b/build.properties.dev index 6ac374b967a..547f5cb3847 100644 --- a/build.properties.dev +++ b/build.properties.dev @@ -5,4 +5,6 @@ build.dir=build dist.dir=dist report.dir=reports log.archive.dir=logs -svn.path=/usr/bin/svn \ No newline at end of file +svn.path=/usr/bin/svn +test.phpunit_configuration_file= +test.phpunit_generate_coverage=0 \ No newline at end of file diff --git a/build.xml b/build.xml index 215d1d5c543..f4150686f7b 100644 --- a/build.xml +++ b/build.xml @@ -63,6 +63,9 @@ + + + @@ -122,19 +125,18 @@ Runs the full test suite. --> - + + + + + + + + + diff --git a/tools/NativePhpunitTask.php b/tools/NativePhpunitTask.php index d4e47c8bbca..1ef582dfec9 100644 --- a/tools/NativePhpunitTask.php +++ b/tools/NativePhpunitTask.php @@ -44,14 +44,26 @@ public function setTestfile($testfile) { } public function setJunitlogfile($junitlogfile) { + if (strlen($junitlogfile) == 0) { + $junitlogfile = NULL; + } + $this->junitlogfile = $junitlogfile; } public function setConfiguration($configuration) { + if (strlen($configuration) == 0) { + $configuration = NULL; + } + $this->configuration = $configuration; } public function setCoverageClover($coverageClover) { + if (strlen($coverageClover) == 0) { + $coverageClover = NULL; + } + $this->coverageClover = $coverageClover; } @@ -92,7 +104,7 @@ public function main() $printer = new NativePhpunitPrinter(); $arguments = array( - 'configuration' => $this->configurationFile, + 'configuration' => $this->configuration, 'coverageClover' => $this->coverageClover, 'junitLogfile' => $this->junitlogfile, 'printer' => $printer, @@ -114,7 +126,9 @@ public function main() $this->log("PHPUnit Success: ".count($result->passed())." tests passed, no ". "failures (".$result->skippedCount()." skipped, ".$result->notImplementedCount()." not implemented)"); + // Hudson for example doesn't like the backslash in class names if (file_exists($this->coverageClover)) { + $this->log("Generated Clover Coverage XML to: ".$this->coverageClover); $content = file_get_contents($this->coverageClover); $content = str_replace("\\", ".", $content); file_put_contents($this->coverageClover, $content);