mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-15 21:12:15 +00:00
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@16515 71c3de6d-444a-0410-be80-ed276b4c234a
17 lines
686 B
Groovy
17 lines
686 B
Groovy
// run unit tests
|
|
import org.apache.commons.io.FileUtils
|
|
|
|
ant.project.setBaseDir(project.basedir)
|
|
|
|
// start from where the core left off, and build from there
|
|
ser=new File(project.basedir,"target/cobertura.ser");
|
|
FileUtils.copyFile(maven.resolveArtifact("${project.groupId}:hudson-core:${project.version}:cobertura:ser"),ser)
|
|
|
|
cob = new Cobertura(project,maven,ant,ser);
|
|
|
|
// instrumenting remote.jar causes all native m2 job to fail, because forked Maven doesn't have cobertura runtime
|
|
cob.instrument(["hudson-core"].collect{ m -> maven.resolveArtifact("${project.groupId}:${m}:${project.version}") })
|
|
cob.runTests()
|
|
cob.report(["../core/src/main/java"])
|
|
cob.makeBuildFailIfTestFail();
|