1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 13:09:50 +00:00

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>
This commit is contained in:
Maksym Kokhan via Openembedded-core
2018-10-04 16:59:01 +03:00
committed by Richard Purdie
parent 244ba49784
commit 74d8acaa0f
+23 -9
View File
@@ -4,12 +4,26 @@ echo
echo "---------------------------- libusb1 tests ---------------------------" echo "---------------------------- libusb1 tests ---------------------------"
echo echo
./stress | tr '\n' ' ' | \ ./stress | { \
sed 's/Starting test run: \([a-zA-Z_]*\)\.\.\. \([a-zA-Z_]*\) (.) /\2 \1\n/g' | \ while read -r str
sed '$d' | \ do
sed '{ echo "$str"
s/^Success/PASS:/g if [ "${str#*Starting test run:}" != "$str" ]
s/^Failure/FAIL:/g then
s/^Error/FAIL:/g name="${str#Starting test run: }"
s/^Skip/SKIP:/g 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
}