[oe-commits] [openembedded-core] 10/10: libusb: ptest: don't skip debug output and fix failures processing
git at git.openembedded.org
git at git.openembedded.org
Thu Oct 4 22:04:33 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 6594f86e117447de9be024b9cef09bd7177e2eaa
Author: Maksym Kokhan via Openembedded-core <openembedded-core at lists.openembedded.org>
AuthorDate: Thu Oct 4 16:59:01 2018 +0300
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")
Signed-off-by: Maksym Kokhan <maksym.kokhan at globallogic.com>
Reviewed-by: Andrii Bordunov <andrii.bordunov at globallogic.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/recipes-support/libusb/libusb1/run-ptest | 32 +++++++++++++++++++--------
1 file changed, 23 insertions(+), 9 deletions(-)
diff --git a/meta/recipes-support/libusb/libusb1/run-ptest b/meta/recipes-support/libusb/libusb1/run-ptest
index 646a966..eaa47a2 100755
--- a/meta/recipes-support/libusb/libusb1/run-ptest
+++ b/meta/recipes-support/libusb/libusb1/run-ptest
@@ -4,12 +4,26 @@ echo
echo "---------------------------- libusb1 tests ---------------------------"
echo
-./stress | tr '\n' ' ' | \
-sed 's/Starting test run: \([a-zA-Z_]*\)\.\.\. \([a-zA-Z_]*\) (.) /\2 \1\n/g' | \
-sed '$d' | \
-sed '{
- s/^Success/PASS:/g
- s/^Failure/FAIL:/g
- s/^Error/FAIL:/g
- s/^Skip/SKIP:/g
-}'
+./stress | { \
+while read -r str
+do
+ echo "$str"
+ if [ "${str#*Starting test run:}" != "$str" ]
+ then
+ name="${str#Starting test run: }"
+ name="${name%...}"
+ else
+ case "$str" in
+ "Success (0)")
+ echo "PASS: $name"
+ ;;
+ "Failure (1)" | "Error (2)")
+ echo "FAIL: $name"
+ ;;
+ "Skip (3)")
+ echo "SKIP: $name"
+ ;;
+ esac
+ fi
+done
+}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list