From 02220d4318e170cff74820feff9bf698c1eebf3f Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Mon, 19 Nov 2018 15:46:22 -0500 Subject: [PATCH] t/110-compile and t/111-example: skip if no C compiler installed. It's nice to validate "real" use with a C compiler, but silly to completely fail validation just because a C compiler is missing. --- t/110-compile/all.do | 7 ++++++- t/111-example/all.do | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/t/110-compile/all.do b/t/110-compile/all.do index a94ac31..1b1954a 100644 --- a/t/110-compile/all.do +++ b/t/110-compile/all.do @@ -1 +1,6 @@ -redo-ifchange hello yellow bellow +if type cc >/dev/null 2>&1; then + redo-ifchange hello yellow bellow +else + echo "$0: No C compiler installed; skipping this test." >&2 + redo-ifcreate /usr/bin/cc +fi diff --git a/t/111-example/all.do b/t/111-example/all.do index 29b0c32..14108cf 100644 --- a/t/111-example/all.do +++ b/t/111-example/all.do @@ -1 +1,6 @@ -redo-ifchange hello +if type cc >/dev/null 2>&1; then + redo-ifchange hello +else + echo "$0: No C compiler installed; skipping this test." >&2 + redo-ifcreate /usr/bin/cc +fi