diff options
author | Maksym Kokhan via Openembedded-core <openembedded-core@lists.openembedded.org> | 2018-10-04 16:59:01 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-10-08 14:13:54 +0100 |
commit | 74d8acaa0f78fb472dbf7ea52b8d8c17173a20a9 (patch) | |
tree | 8b1d54d6ea68430164b53e57ee8f3f3e119b0456 /meta/recipes-support/libusb | |
parent | 244ba497845a41eac8d179fbb057101c19c676f3 (diff) | |
download | poky-74d8acaa0f78fb472dbf7ea52b8d8c17173a20a9.tar.gz |
libusb: ptest: don't skip debug output and fix failures processing
Current run-ptest script prints nothing, when stress tests fail.
Fix it in new implementation, discarding external dependency on sed.
Also leave in place all stress output, just add standard ptest result.
Fixes: 3f0106bf2e41 ("libusb: Add ptest")
(From OE-Core rev: cd05029c78dea48c20f9acb2c5fee56b19193f22)
Signed-off-by: Maksym Kokhan <maksym.kokhan@globallogic.com>
Reviewed-by: Andrii Bordunov <andrii.bordunov@globallogic.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/libusb')
-rwxr-xr-x | meta/recipes-support/libusb/libusb1/run-ptest | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/meta/recipes-support/libusb/libusb1/run-ptest b/meta/recipes-support/libusb/libusb1/run-ptest index 646a966ef9..eaa47a2bc4 100755 --- a/meta/recipes-support/libusb/libusb1/run-ptest +++ b/meta/recipes-support/libusb/libusb1/run-ptest | |||
@@ -4,12 +4,26 @@ echo | |||
4 | echo "---------------------------- libusb1 tests ---------------------------" | 4 | echo "---------------------------- libusb1 tests ---------------------------" |
5 | echo | 5 | echo |
6 | 6 | ||
7 | ./stress | tr '\n' ' ' | \ | 7 | ./stress | { \ |
8 | sed 's/Starting test run: \([a-zA-Z_]*\)\.\.\. \([a-zA-Z_]*\) (.) /\2 \1\n/g' | \ | 8 | while read -r str |
9 | sed '$d' | \ | 9 | do |
10 | sed '{ | 10 | echo "$str" |
11 | s/^Success/PASS:/g | 11 | if [ "${str#*Starting test run:}" != "$str" ] |
12 | s/^Failure/FAIL:/g | 12 | then |
13 | s/^Error/FAIL:/g | 13 | name="${str#Starting test run: }" |
14 | s/^Skip/SKIP:/g | 14 | name="${name%...}" |
15 | }' | 15 | else |
16 | case "$str" in | ||
17 | "Success (0)") | ||
18 | echo "PASS: $name" | ||
19 | ;; | ||
20 | "Failure (1)" | "Error (2)") | ||
21 | echo "FAIL: $name" | ||
22 | ;; | ||
23 | "Skip (3)") | ||
24 | echo "SKIP: $name" | ||
25 | ;; | ||
26 | esac | ||
27 | fi | ||
28 | done | ||
29 | } | ||