Loading service/generate_local_coverage.sh +3 −2 Original line number Original line Diff line number Diff line Loading @@ -13,7 +13,8 @@ script -q ${COVERAGE_TMP_FOLDER}/atest_log \ --jacocoagent-path gs://tradefed_test_resources/teams/code_coverage/jacocoagent.jar \ --jacocoagent-path gs://tradefed_test_resources/teams/code_coverage/jacocoagent.jar \ --coverage --coverage-toolchain JACOCO' --coverage --coverage-toolchain JACOCO' COVERAGE_COLLECTED=$(rg 'Test Logs have been saved in ' ${COVERAGE_TMP_FOLDER}/atest_log | sed -e 's/^.* //' -e 's/log.*$/log/') # "Atest results and logs directory: /tmp/path<CR><LF>" -> "/tmp/path" COVERAGE_COLLECTED=$(rg 'Atest results and logs directory:' ${COVERAGE_TMP_FOLDER}/atest_log | cut -d ':' -f 2 | tr -d '\r' | xargs) # Link source into the tmp folder # Link source into the tmp folder ln -s "${ANDROID_BUILD_TOP}"/packages/modules/Bluetooth/service/src ${COVERAGE_TMP_FOLDER}/com/android/server/bluetooth ln -s "${ANDROID_BUILD_TOP}"/packages/modules/Bluetooth/service/src ${COVERAGE_TMP_FOLDER}/com/android/server/bluetooth Loading @@ -30,7 +31,7 @@ rm -rf ${COVERAGE_TMP_FOLDER}/ServiceBluetoothRobo_unzip/com/android/server/blue # Generate report: # Generate report: # You may want to run "m jacoco-cli" if above command failed # You may want to run "m jacoco-cli" if above command failed java -jar "${ANDROID_BUILD_TOP}"/out/host/linux-x86/framework/jacoco-cli.jar report "${COVERAGE_COLLECTED}"/invocation_*/inv_*/coverage_*.ec --classfiles ${COVERAGE_TMP_FOLDER}/ServiceBluetoothRobo_unzip --html ${COVERAGE_TMP_FOLDER}/coverage --name coverage.html --sourcefiles ${COVERAGE_TMP_FOLDER} java -jar "${ANDROID_BUILD_TOP}"/out/host/linux-x86/framework/jacoco-cli.jar report "${COVERAGE_COLLECTED}"/log/invocation_*/inv_*/coverage_*.ec --classfiles ${COVERAGE_TMP_FOLDER}/ServiceBluetoothRobo_unzip --html ${COVERAGE_TMP_FOLDER}/coverage --name coverage.html --sourcefiles ${COVERAGE_TMP_FOLDER} # Start python server and expose URL # Start python server and expose URL printf "Url to connect to the coverage \033[32m http://%s:8000 \033[0m\n" "$(hostname)" printf "Url to connect to the coverage \033[32m http://%s:8000 \033[0m\n" "$(hostname)" Loading Loading
service/generate_local_coverage.sh +3 −2 Original line number Original line Diff line number Diff line Loading @@ -13,7 +13,8 @@ script -q ${COVERAGE_TMP_FOLDER}/atest_log \ --jacocoagent-path gs://tradefed_test_resources/teams/code_coverage/jacocoagent.jar \ --jacocoagent-path gs://tradefed_test_resources/teams/code_coverage/jacocoagent.jar \ --coverage --coverage-toolchain JACOCO' --coverage --coverage-toolchain JACOCO' COVERAGE_COLLECTED=$(rg 'Test Logs have been saved in ' ${COVERAGE_TMP_FOLDER}/atest_log | sed -e 's/^.* //' -e 's/log.*$/log/') # "Atest results and logs directory: /tmp/path<CR><LF>" -> "/tmp/path" COVERAGE_COLLECTED=$(rg 'Atest results and logs directory:' ${COVERAGE_TMP_FOLDER}/atest_log | cut -d ':' -f 2 | tr -d '\r' | xargs) # Link source into the tmp folder # Link source into the tmp folder ln -s "${ANDROID_BUILD_TOP}"/packages/modules/Bluetooth/service/src ${COVERAGE_TMP_FOLDER}/com/android/server/bluetooth ln -s "${ANDROID_BUILD_TOP}"/packages/modules/Bluetooth/service/src ${COVERAGE_TMP_FOLDER}/com/android/server/bluetooth Loading @@ -30,7 +31,7 @@ rm -rf ${COVERAGE_TMP_FOLDER}/ServiceBluetoothRobo_unzip/com/android/server/blue # Generate report: # Generate report: # You may want to run "m jacoco-cli" if above command failed # You may want to run "m jacoco-cli" if above command failed java -jar "${ANDROID_BUILD_TOP}"/out/host/linux-x86/framework/jacoco-cli.jar report "${COVERAGE_COLLECTED}"/invocation_*/inv_*/coverage_*.ec --classfiles ${COVERAGE_TMP_FOLDER}/ServiceBluetoothRobo_unzip --html ${COVERAGE_TMP_FOLDER}/coverage --name coverage.html --sourcefiles ${COVERAGE_TMP_FOLDER} java -jar "${ANDROID_BUILD_TOP}"/out/host/linux-x86/framework/jacoco-cli.jar report "${COVERAGE_COLLECTED}"/log/invocation_*/inv_*/coverage_*.ec --classfiles ${COVERAGE_TMP_FOLDER}/ServiceBluetoothRobo_unzip --html ${COVERAGE_TMP_FOLDER}/coverage --name coverage.html --sourcefiles ${COVERAGE_TMP_FOLDER} # Start python server and expose URL # Start python server and expose URL printf "Url to connect to the coverage \033[32m http://%s:8000 \033[0m\n" "$(hostname)" printf "Url to connect to the coverage \033[32m http://%s:8000 \033[0m\n" "$(hostname)" Loading