diff --git a/tests/scripts/quiet/cmake b/tests/scripts/quiet/cmake index ea1474f877..2e95c6b938 100755 --- a/tests/scripts/quiet/cmake +++ b/tests/scripts/quiet/cmake @@ -18,14 +18,20 @@ TOOL=$(basename "$0") # Locate original tool ORIGINAL_TOOL=$(type -ap ${TOOL} | grep -v "$0" | head -n1 ) +if [[ ! " $@ " =~ " --version " ]]; then + # Display the command being invoked - if it succeeds, this is all that will + # be displayed. Don't do this for invocations with --version, because + # this output is often parsed by scripts, so we don't want to modify it. + echo -n "${TOOL} " + printf '%q ' "$@" + echo +fi + if [[ " $@ " =~ $NO_SILENCE || -n "${VERBOSE_LOGS}" ]]; then + # Run original command with no output supression ${ORIGINAL_TOOL} "$@" EXIT_STATUS=$? else - # Display the command being invoked - if it succeeds, this is all that will - # be displayed. - echo "${TOOL} $@" - # Run original command and capture output & exit status TMPFILE=$(mktemp /tmp/quiet-${TOOL}.XXXXXX) ${ORIGINAL_TOOL} "$@" > ${TMPFILE} 2>&1 diff --git a/tests/scripts/quiet/make b/tests/scripts/quiet/make index 633758ae6f..0c4869644e 100755 --- a/tests/scripts/quiet/make +++ b/tests/scripts/quiet/make @@ -18,14 +18,20 @@ TOOL=$(basename "$0") # Locate original tool ORIGINAL_TOOL=$(type -ap ${TOOL} | grep -v "$0" | head -n1 ) +if [[ ! " $@ " =~ " --version " ]]; then + # Display the command being invoked - if it succeeds, this is all that will + # be displayed. Don't do this for invocations with --version, because + # this output is often parsed by scripts, so we don't want to modify it. + echo -n "${TOOL} " + printf '%q ' "$@" + echo +fi + if [[ " $@ " =~ $NO_SILENCE || -n "${VERBOSE_LOGS}" ]]; then + # Run original command with no output supression ${ORIGINAL_TOOL} "$@" EXIT_STATUS=$? else - # Display the command being invoked - if it succeeds, this is all that will - # be displayed. - echo "${TOOL} $@" - # Run original command and capture output & exit status TMPFILE=$(mktemp /tmp/quiet-${TOOL}.XXXXXX) ${ORIGINAL_TOOL} "$@" > ${TMPFILE} 2>&1