Skip to content

Commit

Permalink
Remove set -x from coverage collection
Browse files Browse the repository at this point in the history
This causes logs to be very noisy with coverage infrastructure logic
  • Loading branch information
keith committed Mar 22, 2021
1 parent 1b35679 commit 64013e1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion tools/test/collect_cc_coverage.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -x
#!/bin/bash
# Copyright 2016 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -31,11 +31,16 @@
# - COVERAGE_GCOV_OPTIONS Additional options to pass to gcov.
# - ROOT Location from where the code coverage collection
# was invoked.
# - VERBOSE_COVERAGE Print debug info from the coverage scripts
#
# The script looks in $COVERAGE_DIR for the C++ metadata coverage files (either
# gcda or profraw) and uses either lcov or gcov to get the coverage data.
# The coverage data is placed in $COVERAGE_OUTPUT_FILE.

if [[ -n "$VERBOSE_COVERAGE" ]]; then
set -x
fi

# Checks if clang llvm coverage should be used instead of lcov.
function uses_llvm() {
if stat "${COVERAGE_DIR}"/*.profraw >/dev/null 2>&1; then
Expand Down
7 changes: 6 additions & 1 deletion tools/test/collect_coverage.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -x
#!/bin/bash

# Copyright 2016 The Bazel Authors. All rights reserved.
#
Expand All @@ -21,10 +21,15 @@
# LCOV_MERGER - mandatory, location of the LcovMerger
# COVERAGE_DIR - optional, location of the coverage temp directory
# COVERAGE_OUTPUT_FILE - optional, location of the final lcov file
# VERBOSE_COVERAGE - optional, print debug info from the coverage scripts
#
# Script expects that it will be started in the execution root directory and
# not in the test's runfiles directory.

if [[ -n "$VERBOSE_COVERAGE" ]]; then
set -x
fi

function resolve_links() {
local name="$1"

Expand Down

0 comments on commit 64013e1

Please sign in to comment.