diff --git a/fe/fe-core/pom.xml b/fe/fe-core/pom.xml index fa640dc3efa0c5..4c8d960a726d74 100644 --- a/fe/fe-core/pom.xml +++ b/fe/fe-core/pom.xml @@ -894,7 +894,7 @@ under the License. false false - -Xmx512m -javaagent:${settings.localRepository}/org/jmockit/jmockit/${jmockit.version}/jmockit-${jmockit.version}.jar + -Xmx512m -javaagent:${settings.localRepository}/org/jmockit/jmockit/${jmockit.version}/jmockit-${jmockit.version}.jar @{argLine} diff --git a/fe/pom.xml b/fe/pom.xml index d47dfa681dd9b7..92b0dbdf098487 100644 --- a/fe/pom.xml +++ b/fe/pom.xml @@ -111,6 +111,19 @@ under the License. + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + default-prepare-agent + + prepare-agent + + + + @@ -178,6 +191,19 @@ under the License. sonar-maven-plugin 3.9.1.2184 + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + default-prepare-agent + + prepare-agent + + + + @@ -324,6 +350,7 @@ under the License. shade-format-flatbuffers 1.12.0 + 0.8.10 diff --git a/fe/spark-dpp/pom.xml b/fe/spark-dpp/pom.xml index b2f6eb3c54040c..6e3ce454fd0a1c 100644 --- a/fe/spark-dpp/pom.xml +++ b/fe/spark-dpp/pom.xml @@ -120,7 +120,7 @@ under the License. not reuse forked jvm, so that each unit test will run in separate jvm. to avoid singleton confict<--> false - -javaagent:${settings.localRepository}/org/jmockit/jmockit/${jmockit.version}/jmockit-${jmockit.version}.jar + -javaagent:${settings.localRepository}/org/jmockit/jmockit/${jmockit.version}/jmockit-${jmockit.version}.jar @{argLine} diff --git a/run-fe-ut.sh b/run-fe-ut.sh index 8d71d9c6ca9787..e3017ac4ea7436 100755 --- a/run-fe-ut.sh +++ b/run-fe-ut.sh @@ -107,18 +107,22 @@ if [[ -z "${FE_UT_PARALLEL}" ]]; then fi echo "Unit test parallel is: ${FE_UT_PARALLEL}" -if [[ "${COVERAGE}" -eq 1 ]]; then - echo "Run coverage statistic" - ant cover-test +if [[ "${RUN}" -eq 1 ]]; then + echo "Run the specified class: $1" + # eg: + # sh run-fe-ut.sh --run org.apache.doris.utframe.DemoTest + # sh run-fe-ut.sh --run org.apache.doris.utframe.DemoTest#testCreateDbAndTable+test2 + + if [[ "${COVERAGE}" -eq 1 ]]; then + "${MVN_CMD}" test jacoco:report -DfailIfNoTests=false -Dtest="$1" + else + "${MVN_CMD}" test -Dcheckstyle.skip=true -DfailIfNoTests=false -Dtest="$1" + fi else - if [[ "${RUN}" -eq 1 ]]; then - echo "Run the specified class: $1" - # eg: - # sh run-fe-ut.sh --run org.apache.doris.utframe.DemoTest - # sh run-fe-ut.sh --run org.apache.doris.utframe.DemoTest#testCreateDbAndTable+test2 - "${MVN_CMD}" test -Dcheckstyle.skip=true -DfailIfNoTests=false -D test="$1" + echo "Run Frontend UT" + if [[ "${COVERAGE}" -eq 1 ]]; then + "${MVN_CMD}" test jacoco:report -DfailIfNoTests=false else - echo "Run Frontend UT" "${MVN_CMD}" test -Dcheckstyle.skip=true -DfailIfNoTests=false fi fi