[ccache] [PATH]: test: elide which stderr
Joel Rosdahl
joel at rosdahl.net
Sun Sep 25 09:42:26 UTC 2016
Hi Eric,
On 23 September 2016 at 06:41, Eric Bavier <ericbavier at openmailbox.org> wrote:
> While running ccache's test suite via `make check` I get output from
> 'which': [...]
Thanks for the report and suggestion!
I made an alternative fix like this (which also should work with
various shells' builtin "which" implementations):
--- a/test.sh
+++ b/test.sh
@@ -3380,11 +3380,11 @@ upgrade
input_charset
"
-compiler_location=$(which $COMPILER)
+compiler_location=$(which $(echo "$COMPILER" | awk '{print $1}'))
if [ "$compiler_location" = "$COMPILER" ]; then
echo "Compiler: $COMPILER"
else
- echo "Compiler: $COMPILER ($(which $COMPILER))"
+ echo "Compiler: $COMPILER ($compiler_location)"
fi
echo "Compiler version: $($COMPILER --version | head -n 1)"
echo
-- Joel
More information about the ccache
mailing list