From: Joel Rosdahl Date: Sat, 6 Feb 2016 14:04:11 +0000 (+0100) Subject: Fail test suite gracefully if eu-elfcmp is missing X-Git-Tag: v3.3~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a66babf261e6aeacb3e3eb332d879f5f4f6bcfe1;p=thirdparty%2Fccache.git Fail test suite gracefully if eu-elfcmp is missing --- diff --git a/test.sh b/test.sh index fea8c022d..25f24b5a4 100755 --- a/test.sh +++ b/test.sh @@ -3,7 +3,7 @@ # A simple test suite for ccache. # # Copyright (C) 2002-2007 Andrew Tridgell -# Copyright (C) 2009-2015 Joel Rosdahl +# Copyright (C) 2009-2016 Joel Rosdahl # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software @@ -98,7 +98,11 @@ compare_file() { compare_object() { if [ $HOST_OS_LINUX -eq 1 ] && [ $COMPILER_TYPE_CLANG -eq 1 ]; then - eu-elfcmp -q "$1" "$2" + if which eu-elfcmp >/dev/null 2>&1; then + eu-elfcmp -q "$1" "$2" + else + test_failed "Please install elfutils to get eu-elfcmp" + fi else cmp -s "$1" "$2" fi