]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
test: document and fix extra verbose mode (V=2)
authorJo Zzsi <jozzsicsataban@gmail.com>
Sun, 25 Aug 2024 16:28:50 +0000 (12:28 -0400)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Fri, 30 Aug 2024 11:42:52 +0000 (07:42 -0400)
Set 'rd.debug' for all tests  in 'V=2' mode to make
it more verbose than 'V=1' test mode.

.github/workflows/integration.yml
docs/HACKING.md
test/test-functions
tools/test-github.sh

index 16c0bbe862c489b195a87111adeaf433df7214ca..52893cbcdfe5bd1c311dcb50a2ac033a291fe505 100644 (file)
@@ -5,7 +5,9 @@ on:
         branches: [ main ]
 
 env:
-    DEBUGFAIL: "${{ secrets.ACTIONS_STEP_DEBUG && 'rd.debug' }}"
+    # set V to 2 when re-running jobs with debug logging enabled
+    # see https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/troubleshooting-workflows/enabling-debug-logging
+    V: "${{ secrets.ACTIONS_STEP_DEBUG && '2' }}"
 
 jobs:
     basic:
index 1921ec73e52c8f50c451a65ebd8d439c6b583752..9f489ce204ce08d78d9c8a049b1e603fe335efde 100644 (file)
@@ -246,11 +246,16 @@ mentioned in the `test/container` Dockerfiles.
 $ make clean check
 ```
 
-in verbose mode:
+in verbose mode (enabled for GitHub Actions):
 ```
 $ make V=1 clean check
 ```
 
+in extra verbose mode (enabled for debug logging):
+```
+$ make V=2 clean check
+```
+
 only specific test:
 ```
 $ make TESTS="01 20 40" clean check
index a005782784bb8de2f7b5115a9a60dd9a73e71606..8aac2ec72e575a9de91ab1b3d09fe074bd186574 100644 (file)
@@ -24,6 +24,10 @@ if [[ $V != "1" && $V != "2" ]]; then
     TEST_KERNEL_CMDLINE+="quiet "
 fi
 
+if [[ $V == "2" ]]; then
+    TEST_KERNEL_CMDLINE+="rd.debug "
+fi
+
 test_dracut() {
     # directory for test configurations
     mkdir -p /tmp/dracut.conf.d
index 73201d6e0239aba8952ea439bcdbd4e74b9e9d3d..7b3c136551bfd091642a18850515390108d740fa 100755 (executable)
@@ -34,6 +34,6 @@ else
         )" \
         TEST_RUN_ID="$RUN_ID" \
         ${TESTS:+TESTS="$TESTS"} \
-        -k V=1 \
+        -k V="${V:=1}" \
         check
 fi