]> 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>
Fri, 17 Oct 2025 16:23:09 +0000 (12:23 -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>
(cherry picked from commit 503ec0c294c49a32d958e6e5a093efc6c8f92434)

install-deps.sh

index 555c3cf844917c93910b76d9b6a43713e25a5b72..261d0fb90f22cf4acd79d9979093ac22ce9495ef 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