]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
install-deps.sh: let FOR_MAKE_CHECK variable take precedence
authorJohn Mulligan <jmulligan@redhat.com>
Mon, 13 Oct 2025 20:23:10 +0000 (16:23 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Mon, 13 Oct 2025 22:03:21 +0000 (18:03 -0400)
Previously, the FOR_MAKE_CHECK variable could only enable installing
extra (test) dependencies when install-deps.sh was used and it was
ignored if `tty -s` exited true. This change allows FOR_MAKE_CHECK to
take precedence over the tty check and to specify one of true, 1, yes to
enable extra "for make check" deps or false, 0, no to explicitly disable
the extra deps.

Based-on-work-by: Dan Mick <dan.mick@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
install-deps.sh

index 8ca4be01feb710fcce33c4db5616cc32b27fc930..af060baab9621e7a2203a55dbb9d8aa4819048b7 100755 (executable)
@@ -320,13 +320,22 @@ function preload_wheels_for_tox() {
 }
 
 for_make_check=false
-if tty -s; then
+if [ "$FOR_MAKE_CHECK" ]; then
+    case "$FOR_MAKE_CHECK" in
+        true|1|yes)
+            for_make_check=true
+        ;;
+        false|0|no)
+            for_make_check=false
+        ;;
+        *)
+            echo "error: unexpected FOR_MAKE_CHECK value: ${FOR_MAKE_CHECK}"
+            exit 2
+        ;;
+    esac
+elif tty -s; then
     # interactive
     for_make_check=true
-elif [ $FOR_MAKE_CHECK ]; then
-    for_make_check=true
-else
-    for_make_check=false
 fi
 
 if [ x$(uname)x = xFreeBSDx ]; then