]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
test: make documentation as part of test runs
authorJo Zzsi <jozzsicsataban@gmail.com>
Mon, 21 Oct 2024 15:32:53 +0000 (11:32 -0400)
committerLaszlo <laszlo.gombos@gmail.com>
Tue, 22 Oct 2024 12:20:23 +0000 (08:20 -0400)
test/test-github.sh

index 67455fb504fdfecbc5dca11f44f35feb24ab5bdc..0955bacf5bb15fad78e769c2fa488a181fd3fda7 100755 (executable)
@@ -4,32 +4,26 @@ set -ex
 
 [[ -d ${0%/*} ]] && cd "${0%/*}"/../
 
-RUN_ID="$1"
-TESTS=$2
+# disable documentation for extended tests
+if [ "$2" != "10" ]; then
+    CONFIGURE_ARG+=" --disable-documentation "
+fi
 
 # if is cargo installed, let's build and test dracut-cpio
 if command -v cargo > /dev/null; then
-    ./configure --enable-dracut-cpio
-else
-    ./configure
+    CONFIGURE_ARG+=" --enable-dracut-cpio "
 fi
 
-NCPU=$(getconf _NPROCESSORS_ONLN)
-
-# treat warnings as error
+./configure "$CONFIGURE_ARG"
 
-if ! [[ $TESTS ]]; then
-    CFLAGS="-Wextra -Werror" make -j "$NCPU" all syncheck
-else
-    CFLAGS="-Wextra -Werror" make -j "$NCPU" enable_documentation=no all
+V="${V:=1}"
 
-    cd test
+# treat warnings as error
+CFLAGS="-Wextra -Werror" make -j "$(getconf _NPROCESSORS_ONLN)" all
 
-    # shellcheck disable=SC2012
-    time LOGTEE_TIMEOUT_MS=590000 make \
-        enable_documentation=no \
-        TEST_RUN_ID="$RUN_ID" \
-        ${TESTS:+TESTS="$TESTS"} \
-        -k V="${V:=1}" \
-        check
+# run syncheck as part of basic tests
+if [ "$2" = "10" ]; then
+    make syncheck
 fi
+
+cd test && time make TEST_RUN_ID="$1" TESTS="$2" -k V="$V" check