Skip to content

Commit

Permalink
test: document and fix extra verbose mode (V=2)
Browse files Browse the repository at this point in the history
Set 'rd.debug' for all tests  in 'V=2' mode to make
it more verbose than 'V=1' test mode.
  • Loading branch information
jozzsi authored and LaszloGombos committed Aug 30, 2024
1 parent 2bb7444 commit 8f46f07
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 6 additions & 1 deletion docs/HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions test/test-functions
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tools/test-github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ else
)" \
TEST_RUN_ID="$RUN_ID" \
${TESTS:+TESTS="$TESTS"} \
-k V=1 \
-k V="${V:=1}" \
check
fi

0 comments on commit 8f46f07

Please sign in to comment.