Skip to content

Commit

Permalink
Move gcov check to the end
Browse files Browse the repository at this point in the history
  • Loading branch information
finn-ball committed Apr 2, 2021
1 parent dd36cf8 commit 9c1c605
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/test/shell/bazel/remote/remote_execution_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2437,11 +2437,6 @@ function test_cc_rbe_coverage_produces_report() {
return 0
fi

gcov --help | grep "\-i,"
if [[ $? -eq 1 ]]; then
echo "gcov does not support intermediate files."
return 0
fi
local test_dir="a/cc/coverage_test"
mkdir -p $test_dir

Expand Down Expand Up @@ -2544,6 +2539,12 @@ EOF
//"$test_dir":hello-test >& $TEST_log \
|| fail "Failed to run coverage for cc_test"

gcov --help | grep "\-i,"
if [[ $? -eq 1 ]]; then
echo "gcov does not support intermediate files."
return 0
fi

# Different gcov versions generate different outputs.
# Simply check if this is empty or not.
if [[ ! -s bazel-testlogs/a/cc/coverage_test/hello-test/coverage.dat ]]; then
Expand Down

0 comments on commit 9c1c605

Please sign in to comment.