我能够获得coveage文件,但是从Jenkins我总是得到一个错误,在Ubuntu 14.04上,获得** / coverage.ec中的代码覆盖率,但Jenkins给了我一个错误
ERROR: Build step failed with exception
java.lang.IllegalStateException: basedir /var/lib/jenkins/jobs/Android_Build_TestCC/builds/22/jacoco/classes does not exist
at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:550)
at org.codehaus.plexus.util.FileUtils.getFileAndDirectoryNames(FileUtils.java:1717)
at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1645)
at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1627)
at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1601)
at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1584)
at hudson.plugins.jacoco.ExecutionFileLoader.analyzeStructure(ExecutionFileLoader.java:124)
at hudson.plugins.jacoco.ExecutionFileLoader.loadBundleCoverage(ExecutionFileLoader.java:133)
at hudson.plugins.jacoco.JacocoReportDir.parse(JacocoReportDir.java:102)
at hudson.plugins.jacoco.JacocoBuildAction.loadRatios(JacocoBuildAction.java:291)
at hudson.plugins.jacoco.JacocoBuildAction.load(JacocoBuildAction.java:273)
at hudson.plugins.jacoco.JacocoPublisher.perform(JacocoPublisher.java:371)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
at hudson.model.Run.execute(Run.java:1766)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:374)
Build step 'Record JaCoCo coverage report' marked build as failure
Finished: FAILURE
答案 0 :(得分:0)
如果在Jenkins Jacoco插件的以下字段中有空格,则可能导致此错误:exec文件的路径,包含,类目录的路径,排除
请参阅以下Jenkins' BUG: https://issues.jenkins-ci.org/browse/JENKINS-22776