xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-support/libusb/libusb1/run-ptest (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1#!/bin/sh
2
3echo
4echo "---------------------------- libusb1 tests ---------------------------"
5echo
6
7./stress | { \
8while read -r str
9do
10	echo "$str"
11	if [ "${str#*Starting test run:}" != "$str" ]
12	then
13		name="${str#Starting test run: }"
14		name="${name%...}"
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
28done
29}
30