From 68b296e96366c6eb7a6f457f7d65b0084b21bf2b Mon Sep 17 00:00:00 2001 From: emma Date: Sun, 24 Dec 2023 17:31:17 -0700 Subject: [PATCH] =?UTF-8?q?tests:=20cc-compat.sh:=20fixed=20bug=20when=20a?= =?UTF-8?q?ll=20tested=20compilers=20aren=E2=80=99t=20present?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/cc-compat.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/cc-compat.sh b/tests/cc-compat.sh index 0fe28d8..c75d0e0 100755 --- a/tests/cc-compat.sh +++ b/tests/cc-compat.sh @@ -12,18 +12,22 @@ set -e if ! ls GNUmakefile >/dev/null 2>&1 then printf '%s: Run this script in the root of the project.\n' "$0" 1>&2 - exit 1 + exit 64 # sysexits.h(3) EX_USAGE fi make clean -for CC in cc\ +for CC in cc \ clang \ gcc \ tcc \ 'zig cc' do export CC + + command -v "$(printf '%s\n' "$CC" | cut -d ' ' -f1)" >/dev/null 2>&1 \ + || continue + printf '%s: %s: Testing build.\n' "$0" "$CC" make CC="$CC" && printf '%s: Build successful.\n' "$0"