diff options
Diffstat (limited to 'tests/script.sh')
| -rwxr-xr-x | tests/script.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/script.sh b/tests/script.sh index 162437af8f22..5942e13159fe 100755 --- a/tests/script.sh +++ b/tests/script.sh @@ -154,6 +154,21 @@ elif [ "$generate" -eq 0 ]; then printf 'Skipping %s script %s\n' "$d" "$f" exit 0 else + + set +e + + # This is to check that the command exists. If not, we should not try to + # generate the test. Instead, we should just skip. + command -v "$d" + err="$?" + + set -e + + if [ "$err" -ne 0 ]; then + printf 'Could not find %s to generate results; skipping %s script %s\n' "$d" "$d" "$f" + exit 0 + fi + # This sed, and the script, are to remove an incompatibility with GNU bc, # where GNU bc is wrong. See the development manual # (manuals/development.md#script-tests) for more information. |
