[PATCH dwarves 4/4] tests: distinguish between failed/skipped tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When a test returns 2, it indicates it had to be skipped;
distingiush between this and other non-zero failures; the latter
should result in tests returning 1 to indicate something failed.

Signed-off-by: Alan Maguire <alan.maguire@xxxxxxxxxx>
---
 tests/tests | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tests/tests b/tests/tests
index 38bb975..11921ad 100755
--- a/tests/tests
+++ b/tests/tests
@@ -5,11 +5,24 @@
 tests_dir=$(dirname $0)
 cd $tests_dir
 
+let status=0
 let nr=1
 for test in *.sh ; do
 	printf "%3d: " $nr
 	./$test
+	case $? in
+	0)
+		;;
+	2)
+		echo "skipping..."
+		;;
+	*)
+		status=1
+		;;
+	esac
 	let nr+=1
 done
 
 cd -
+
+exit $status
-- 
2.43.5





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux