Could not generate exec file, please help me to fix this issue.

149 views
Skip to first unread message

赵斌

unread,
Dec 7, 2017, 4:42:11 AM12/7/17
to JaCoCo and EclEmma Users
Hi,
  I am running hbase UT to generate coverage report, but I could not generate exec file successfully ! Please help me to fix this issue!

maven surefire version: maven-surefire-plugin:2.20.1

The following is my command:
MVN_REPO=`git rev-parse --show-toplevel`/.m2/repository

mvn -pl com.meituan.hbase:hbase-examples -Dmaven.repo.local=$MVN_REPO -Dmaven.test
.failure.ignore=true -Dtest=* test org.jacoco:jacoco-maven-plugin:0.7.9:prepare-agent

argLine:
<surefire.Xmx>2800m</surefire.Xmx>
<maxpermsize>-XX:MaxPermSize=512m</maxpermsize>

<argLine>${hbase-surefire.argLine}</argLine>
<hbase-surefire.argLine>-enableassertions -XX:MaxDirectMemorySize=1G -Xmx${surefire.Xmx}
      ${maxpermsize} -Djava.security.egd=file:/dev/./urandom -Djava.net.preferIPv4Stack=true
      -Djava.awt.headless=true
</hbase-surefire.argLine>


The following is output: The output information shows that the exec file has been generated, but the file is not actually generated

[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ hbase-examples ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.20.1:test (default-test) @ hbase-examples ---
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.hadoop.hbase.types.TestPBCell
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.969 s - in org.apache.hadoop.hbase.types.TestPBCell
[INFO] Running org.apache.hadoop.hbase.mapreduce.TestMapReduceExamples
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.714 s - in org.apache.hadoop.hbase.mapreduce.TestMapReduceExamples
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-surefire-plugin:2.20.1:test (secondPartTestsExecution) @ hbase-examples ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- jacoco-maven-plugin:0.7.9:prepare-agent (default-cli) @ hbase-examples ---
[INFO] argLine set to -javaagent:/opt/hbase-1.2.4/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/opt/hbase-1.2.4/hbase-examples/target/jacoco.exec -enableassertions -XX:MaxDirectMemorySize=1G -Xmx2800m
 -XX:MaxPermSize=512m -Djava.security.egd=file:/dev/./urandom -Djava.net.preferIPv4Stack=true
 -Djava.awt.headless=true
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.899 s
[INFO] Finished at: 2017-12-07T17:22:47+08:00
[INFO] Final Memory: 70M/10035M
[INFO] ------------------------------------------------------------------------


$ ls /opt/hbase-1.2.4/hbase-examples/target/jacoco.exec
ls: cannot access /opt/hbase-1.2.4/hbase-examples/target/jacoco.exec: No such file or directory

Evgeny Mandrikov

unread,
Dec 7, 2017, 5:04:23 AM12/7/17
to JaCoCo and EclEmma Users
Hi,

On Thursday, December 7, 2017 at 10:42:11 AM UTC+1, 赵斌 wrote:
The output information shows that the exec file has been generated, but the file is not actually generated

This output doesn't show that file is generated - it shows change of "argLine" property.
Also it shows that this change happens after execution of tests, which is wrong - "jacoco-maven-plugin:0.7.9:prepare-agent" should be executed before "maven-surefire-plugin:2.20.1:test".
Change order of "test" and "prepare-agent" in your command-line.

Message has been deleted

赵斌

unread,
Dec 10, 2017, 11:02:11 PM12/10/17
to JaCoCo and EclEmma Users
Thanks for your reply. You helped me to solve this problem
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages