diff --git a/src/java_tools/junitrunner/java/com/google/testing/coverage/BUILD b/src/java_tools/junitrunner/java/com/google/testing/coverage/BUILD index d4d7508c94ebbf..1714f62434776b 100644 --- a/src/java_tools/junitrunner/java/com/google/testing/coverage/BUILD +++ b/src/java_tools/junitrunner/java/com/google/testing/coverage/BUILD @@ -105,11 +105,11 @@ genrule( "if [[ $$(uname -a) =~ MSYS ]] || [[ $$(uname -a) =~ CYGWIN ]] || [[ $$(uname -a) =~ freebsd ]]; then", " cp \"$(location :JacocoCoverage_deploy.jar)\" \"$@\";", "else", - " \"$(JAVA)\" -jar \"$(location //third_party/java/jarjar:jarjar_bin_deploy.jar)\" process \"$(location :JacocoCoverage.jarjar)\" \"$(location :JacocoCoverage_deploy.jar)\" \"$@\"", + " \"$(JAVA)\" -jar \"$(location //third_party/java/jarjar:jarjar_command_deploy.jar)\" --rules \"$(location :JacocoCoverage.jarjar)\" --output \"$@\" \"$(location :JacocoCoverage_deploy.jar)\"", "fi", ]), tools = [ - "//third_party/java/jarjar:jarjar_bin_deploy.jar", + "//third_party/java/jarjar:jarjar_command_deploy.jar", "//tools/defaults:jdk", ], ) diff --git a/src/test/shell/bazel/bazel_coverage_test.sh b/src/test/shell/bazel/bazel_coverage_test.sh index 4b271ca6478ba6..c8cbb038fc1f81 100755 --- a/src/test/shell/bazel/bazel_coverage_test.sh +++ b/src/test/shell/bazel/bazel_coverage_test.sh @@ -79,8 +79,18 @@ EOF bazel coverage //:test &>$TEST_log || fail "Coverage for //:test failed" + echo ================ TL ====================== + cat $TEST_log + echo ================ TL END ================== + ending_part=$(sed -n -e '/PASSED/,$p' $TEST_log) + + echo ====== EP ====== + echo "$ending_part" + echo ====== END EP ====== + coverage_file_path=$(grep -Eo "/[/a-zA-Z0-9\.\_\-]+\.dat$" <<< "$ending_part") + echo ========= CFP "$coverage_file_path" [ -e $coverage_file_path ] || fail "Coverage output file not exists!" cat < result.dat @@ -107,5 +117,4 @@ EOF fi } -# TODO(#2227): Re-enable when the jacoco processor issue is fixed. -#run_suite "test tests" +run_suite "test tests"