diff options
author | Ross Burton <ross.burton@arm.com> | 2024-03-21 20:15:56 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-03-23 10:18:20 +0000 |
commit | 9d1df0596f6f3db6f63ae83559fbea3cc372503a (patch) | |
tree | 8214e2ecea14f8e927f38f99104b0f9941fe56a6 /meta/recipes-devtools/tcltk | |
parent | 6b70b8b646bf1b3409d12188b3abb7da8d078878 (diff) | |
download | poky-9d1df0596f6f3db6f63ae83559fbea3cc372503a.tar.gz |
tcl: improve run-ptest
By setting ERROR_ON_FAILURES we don't need to grep the output to know
if the tests failed. By default the log runner will print the failed
test case, so we don't need to store the log at all.
Set the skipped tests across multiple lines so that it's easier to see
what skips are related to what bugs, and to avoid very long lines.
Use basename instead of awk to get the test name.
(From OE-Core rev: a3fffea6b370e22380b0699dcefcda16fdc1f116)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/tcltk')
-rw-r--r-- | meta/recipes-devtools/tcltk/tcl/run-ptest | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/meta/recipes-devtools/tcltk/tcl/run-ptest b/meta/recipes-devtools/tcltk/tcl/run-ptest index 87e025fce1..affce9ab81 100644 --- a/meta/recipes-devtools/tcltk/tcl/run-ptest +++ b/meta/recipes-devtools/tcltk/tcl/run-ptest | |||
@@ -3,19 +3,25 @@ | |||
3 | # clock.test needs a timezone to be set | 3 | # clock.test needs a timezone to be set |
4 | export TZ="Europe/London" | 4 | export TZ="Europe/London" |
5 | export TCL_LIBRARY=library | 5 | export TCL_LIBRARY=library |
6 | export ERROR_ON_FAILURES=1 | ||
6 | 7 | ||
7 | # Some tests are overly strict with timings and fail on loaded systems. | 8 | # Some tests are overly strict with timings and fail on loaded systems. |
8 | # See bugs #14825 #14882 #15081 #15321. | 9 | SKIP="" |
9 | SKIPPED_TESTS='async-* cmdMZ-6.6 event-* exit-1.* socket-* socket_inet-*' | 10 | # 15321 |
11 | SKIP="$SKIP async-\* event-\*" | ||
12 | # 14882 | ||
13 | SKIP="$SKIP cmdMZ-6.6" | ||
14 | # 15081 | ||
15 | SKIP="$SKIP exit-1.\*" | ||
16 | # 14825 | ||
17 | SKIP="$SKIP socket-\* socket_inet-\*" | ||
10 | 18 | ||
11 | for i in `ls tests/*.test | awk -F/ '{print $2}'`; do | 19 | for i in tests/*.test; do |
12 | ./tcltest tests/all.tcl -file $i -skip "$SKIPPED_TESTS" >$i.log 2>&1 | 20 | i=$(basename $i) |
13 | grep -q -F -e "Files with failing tests:" -e "Test files exiting with errors:" $i.log | 21 | ./tcltest tests/all.tcl -file $i -skip "$SKIP" |
14 | if [ $? -eq 0 ]; then | 22 | if [ $? -eq 0 ]; then |
15 | echo "FAIL: $i" | ||
16 | cat $i.log | ||
17 | else | ||
18 | echo "PASS: $i" | 23 | echo "PASS: $i" |
24 | else | ||
25 | echo "FAIL: $i" | ||
19 | fi | 26 | fi |
20 | rm -f $i.log | ||
21 | done | 27 | done |