Skip to content

Commit

Permalink
Fix the output to work with the updated xUnit plugin from Jenkins, si…
Browse files Browse the repository at this point in the history
…nce its syntax requirements appear to have changed.
  • Loading branch information
Mat Gadd committed Jul 26, 2013
1 parent f178970 commit ae13eac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions QunitTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@ public function main() {
if (file_exists($this->reportPath)) {
unlink($this->reportPath);
}
file_put_contents($this->reportPath,'<testsuite name="qunit">' . $this->resultXml . '</testsuite>');
if ($this->haltOnFailure && $this->hasErrors) throw new BuildException('QUnit tests failed');
file_put_contents($this->reportPath, '<testsuites>' . $this->resultXml . '</testsuites>');
if ($this->haltOnFailure && $this->hasErrors) {
throw new BuildException('QUnit tests failed');
}
}

public function run($file) {
Expand Down

0 comments on commit ae13eac

Please sign in to comment.