diff mbox series

[1/6] tests/decodetree/check.sh: Exit failure for all failures

Message ID 20230523120447.728365-2-peter.maydell@linaro.org
State Accepted
Headers show
Series decodetree: support named fields | expand

Commit Message

Peter Maydell May 23, 2023, 12:04 p.m. UTC
The check.sh script doesn't set its exit status to 1 for failures in
the succ_* (should-pass) tests, only for the err_* (should-error)
tests.  This means that even on a test failure meson will report that
the test suite passed.  Set the exit status for all failures.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
In an ideal world we'd tell meson how to run each test, so that
we got per-test pass/fail/log information, I suppose.
---
 tests/decode/check.sh | 1 +
 1 file changed, 1 insertion(+)

Comments

Richard Henderson May 23, 2023, 5:49 p.m. UTC | #1
On 5/23/23 05:04, Peter Maydell wrote:
> The check.sh script doesn't set its exit status to 1 for failures in
> the succ_* (should-pass) tests, only for the err_* (should-error)
> tests.  This means that even on a test failure meson will report that
> the test suite passed.  Set the exit status for all failures.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> In an ideal world we'd tell meson how to run each test, so that
> we got per-test pass/fail/log information, I suppose.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

But I've also just sent a conversion to meson.


r~
diff mbox series

Patch

diff --git a/tests/decode/check.sh b/tests/decode/check.sh
index 95445a01155..4b5a47fbbf2 100755
--- a/tests/decode/check.sh
+++ b/tests/decode/check.sh
@@ -18,6 +18,7 @@  done
 for i in succ_*.decode; do
     if ! $PYTHON $DECODETREE $i > /dev/null 2> /dev/null; then
         echo FAIL:$i 1>&2
+        E=1
     fi
 done