* [PATCH] test: Display count of skipped tests in status and summary
@ 2025-05-14 6:41 Laurent Vivier
2025-05-14 7:08 ` Stefano Brivio
0 siblings, 1 reply; 2+ messages in thread
From: Laurent Vivier @ 2025-05-14 6:41 UTC (permalink / raw)
To: passt-dev; +Cc: Laurent Vivier
This commit enhances test reporting by tracking and displaying the
number of skipped tests.
The skipped test count is now visible in the tmux status bar during
execution and included in the final test summary log. This provides
a more complete overview of test suite results.
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
test/lib/term | 7 +++++--
test/run | 4 ++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/test/lib/term b/test/lib/term
index ed690de82c20..089364c67f85 100755
--- a/test/lib/term
+++ b/test/lib/term
@@ -19,6 +19,7 @@ STATUS_FILE_INDEX=0
STATUS_COLS=
STATUS_PASS=0
STATUS_FAIL=0
+STATUS_SKIPPED=0
PR_RED='\033[1;31m'
PR_GREEN='\033[1;32m'
@@ -439,19 +440,21 @@ info_layout() {
# status_test_ok() - Update counter of passed tests, log and display message
status_test_ok() {
STATUS_PASS=$((STATUS_PASS + 1))
- tmux set status-right "PASS: ${STATUS_PASS} | FAIL: ${STATUS_FAIL} | #(TZ="UTC" date -Iseconds)"
+ tmux set status-right "PASS: ${STATUS_PASS} | FAIL: ${STATUS_FAIL} | SKIPPED: ${STATUS_SKIPPED} | #(TZ="UTC" date -Iseconds)"
info_passed
}
# status_test_fail() - Update counter of failed tests, log and display message
status_test_fail() {
STATUS_FAIL=$((STATUS_FAIL + 1))
- tmux set status-right "PASS: ${STATUS_PASS} | FAIL: ${STATUS_FAIL} | #(TZ="UTC" date -Iseconds)"
+ tmux set status-right "PASS: ${STATUS_PASS} | FAIL: ${STATUS_FAIL} | SKIPPED: ${STATUS_SKIPPED} | #(TZ="UTC" date -Iseconds)"
info_failed
}
# status_test_fail() - Update counter of failed tests, log and display message
status_test_skip() {
+ STATUS_SKIPPED=$((STATUS_SKIPPED + 1))
+ tmux set status-right "PASS: ${STATUS_PASS} | FAIL: ${STATUS_FAIL} | SKIPPED: ${STATUS_SKIPPED} | #(TZ="UTC" date -Iseconds)"
info_skipped
}
diff --git a/test/run b/test/run
index 4e86f30fb750..a6070d28e8c4 100755
--- a/test/run
+++ b/test/run
@@ -202,7 +202,7 @@ skip_distro() {
perf_finish
[ ${CI} -eq 1 ] && video_stop
- log "PASS: ${STATUS_PASS}, FAIL: ${STATUS_FAIL}"
+ log "PASS: ${STATUS_PASS}, FAIL: ${STATUS_FAIL} SKIPPED: ${STATUS_SKIPPED}"
pause_continue \
"Press any key to keep test session open" \
@@ -236,7 +236,7 @@ run_selected() {
done
teardown "${__setup}"
- log "PASS: ${STATUS_PASS}, FAIL: ${STATUS_FAIL}"
+ log "PASS: ${STATUS_PASS}, FAIL: ${STATUS_FAIL} SKIPPED: ${STATUS_SKIPPED}"
pause_continue \
"Press any key to keep test session open" \
--
@@ -202,7 +202,7 @@ skip_distro() {
perf_finish
[ ${CI} -eq 1 ] && video_stop
- log "PASS: ${STATUS_PASS}, FAIL: ${STATUS_FAIL}"
+ log "PASS: ${STATUS_PASS}, FAIL: ${STATUS_FAIL} SKIPPED: ${STATUS_SKIPPED}"
pause_continue \
"Press any key to keep test session open" \
@@ -236,7 +236,7 @@ run_selected() {
done
teardown "${__setup}"
- log "PASS: ${STATUS_PASS}, FAIL: ${STATUS_FAIL}"
+ log "PASS: ${STATUS_PASS}, FAIL: ${STATUS_FAIL} SKIPPED: ${STATUS_SKIPPED}"
pause_continue \
"Press any key to keep test session open" \
--
2.49.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] test: Display count of skipped tests in status and summary
2025-05-14 6:41 [PATCH] test: Display count of skipped tests in status and summary Laurent Vivier
@ 2025-05-14 7:08 ` Stefano Brivio
0 siblings, 0 replies; 2+ messages in thread
From: Stefano Brivio @ 2025-05-14 7:08 UTC (permalink / raw)
To: Laurent Vivier; +Cc: passt-dev
On Wed, 14 May 2025 08:41:29 +0200
Laurent Vivier <lvivier@redhat.com> wrote:
> This commit enhances test reporting by tracking and displaying the
> number of skipped tests.
>
> The skipped test count is now visible in the tmux status bar during
> execution and included in the final test summary log. This provides
> a more complete overview of test suite results.
Makes sense, thanks, just one nit:
>
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
> test/lib/term | 7 +++++--
> test/run | 4 ++--
> 2 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/test/lib/term b/test/lib/term
> index ed690de82c20..089364c67f85 100755
> --- a/test/lib/term
> +++ b/test/lib/term
> @@ -19,6 +19,7 @@ STATUS_FILE_INDEX=0
> STATUS_COLS=
> STATUS_PASS=0
> STATUS_FAIL=0
> +STATUS_SKIPPED=0
>
> PR_RED='\033[1;31m'
> PR_GREEN='\033[1;32m'
> @@ -439,19 +440,21 @@ info_layout() {
> # status_test_ok() - Update counter of passed tests, log and display message
> status_test_ok() {
> STATUS_PASS=$((STATUS_PASS + 1))
> - tmux set status-right "PASS: ${STATUS_PASS} | FAIL: ${STATUS_FAIL} | #(TZ="UTC" date -Iseconds)"
> + tmux set status-right "PASS: ${STATUS_PASS} | FAIL: ${STATUS_FAIL} | SKIPPED: ${STATUS_SKIPPED} | #(TZ="UTC" date -Iseconds)"
> info_passed
> }
>
> # status_test_fail() - Update counter of failed tests, log and display message
> status_test_fail() {
> STATUS_FAIL=$((STATUS_FAIL + 1))
> - tmux set status-right "PASS: ${STATUS_PASS} | FAIL: ${STATUS_FAIL} | #(TZ="UTC" date -Iseconds)"
> + tmux set status-right "PASS: ${STATUS_PASS} | FAIL: ${STATUS_FAIL} | SKIPPED: ${STATUS_SKIPPED} | #(TZ="UTC" date -Iseconds)"
> info_failed
> }
>
> # status_test_fail() - Update counter of failed tests, log and display message
> status_test_skip() {
> + STATUS_SKIPPED=$((STATUS_SKIPPED + 1))
> + tmux set status-right "PASS: ${STATUS_PASS} | FAIL: ${STATUS_FAIL} | SKIPPED: ${STATUS_SKIPPED} | #(TZ="UTC" date -Iseconds)"
> info_skipped
> }
>
> diff --git a/test/run b/test/run
> index 4e86f30fb750..a6070d28e8c4 100755
> --- a/test/run
> +++ b/test/run
> @@ -202,7 +202,7 @@ skip_distro() {
> perf_finish
> [ ${CI} -eq 1 ] && video_stop
>
> - log "PASS: ${STATUS_PASS}, FAIL: ${STATUS_FAIL}"
> + log "PASS: ${STATUS_PASS}, FAIL: ${STATUS_FAIL} SKIPPED: ${STATUS_SKIPPED}"
Here, and below, the string is missing a comma before "SKIPPED". I can
fix it up on merge if you prefer (or resend, as you wish).
>
> pause_continue \
> "Press any key to keep test session open" \
> @@ -236,7 +236,7 @@ run_selected() {
> done
> teardown "${__setup}"
>
> - log "PASS: ${STATUS_PASS}, FAIL: ${STATUS_FAIL}"
> + log "PASS: ${STATUS_PASS}, FAIL: ${STATUS_FAIL} SKIPPED: ${STATUS_SKIPPED}"
>
> pause_continue \
> "Press any key to keep test session open" \
--
Stefano
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-14 7:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-14 6:41 [PATCH] test: Display count of skipped tests in status and summary Laurent Vivier
2025-05-14 7:08 ` Stefano Brivio
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).