Skip to content

Commit 2fce4fa

Browse files
Fix non-$should_use_xcodebuild path of test runner (#2666)
Broke in fa8ce4c. * Revert accidental inclusion of `KEEP_XCRESULT_ON_SUCCESS` * Move `xcrun llvm-profdata merge` back to where it belongs Signed-off-by: Brentley Jones <[email protected]>
1 parent 338c2e0 commit 2fce4fa

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

apple/testing/default_runner/ios_xctestrun_runner.template.sh

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -529,14 +529,6 @@ else
529529
|| test_exit_code=$?
530530
fi
531531

532-
if [[ "$test_exit_code" -eq 0 &&
533-
"$create_xcresult_bundle" == true &&
534-
"${KEEP_XCRESULT_ON_SUCCESS:-1}" != "1" ]]
535-
then
536-
# Reduce download size by removing the xcresult bundle if the test run was successful
537-
rm -r "$result_bundle_path"
538-
fi
539-
540532
post_action_binary=%(post_action_binary)s
541533
TEST_EXIT_CODE=$test_exit_code \
542534
TEST_LOG_FILE="$testlog" \
@@ -551,7 +543,6 @@ fi
551543
profdata="$test_tmp_dir/$simulator_id/Coverage.profdata"
552544
if [[ "$should_use_xcodebuild" == false ]]; then
553545
profdata="$test_tmp_dir/coverage.profdata"
554-
xcrun llvm-profdata merge "$profraw" --output "$profdata"
555546
fi
556547

557548
if [[ "${COLLECT_PROFDATA:-0}" == "1" && -f "$profdata" ]]; then
@@ -622,6 +613,10 @@ if [[ "${COVERAGE:-}" -ne 1 ]]; then
622613
exit 0
623614
fi
624615

616+
if [[ "$should_use_xcodebuild" == false ]]; then
617+
xcrun llvm-profdata merge "$profraw" --output "$profdata"
618+
fi
619+
625620
lcov_args=(
626621
-instr-profile "$profdata"
627622
-ignore-filename-regex='.*external/.+'

0 commit comments

Comments
 (0)