]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Require working script command for the color_diagnostics test suite
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 8 Jun 2020 20:07:54 +0000 (22:07 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 14 Jun 2020 07:02:19 +0000 (09:02 +0200)
test/suites/color_diagnostics.bash

index 0ac5aca95c156d42489f9c919d99454ec96bbaea..550990488055e28d33677fd64928ac49f4cf5da2 100644 (file)
@@ -7,6 +7,11 @@ elif $COMPILER_TYPE_CLANG ; then
 fi
 
 SUITE_color_diagnostics_PROBE() {
+    if ! script --return --quiet --command true /dev/null </dev/null >/dev/null 2>&1; then
+        echo "the script tool is not installed or does not support required options"
+        return
+    fi
+
     # Probe that real compiler actually supports colored diagnostics.
     if [[ ! $color_diagnostics_enable || ! $color_diagnostics_disable ]] ; then
         echo "compiler $COMPILER does not support colored diagnostics"