summaryrefslogtreecommitdiffstats
path: root/development/opendbx/odbxtest_exit_1_on_error.diff
blob: 33881b4333644a806a6c56cf70894caa6a3b3c10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
This way if the test fails, the build will fail.
Need to send upstream.
Index: libopendbx-1.4.6/test/odbxtest.sh
===================================================================
--- libopendbx-1.4.6.orig/test/odbxtest.sh	2012-05-06 08:10:59.000000000 -0400
+++ libopendbx-1.4.6/test/odbxtest.sh	2012-11-19 12:21:05.468414873 -0500
@@ -7,6 +7,7 @@
 if ! test -f odbxtest.site
 then
 	echo "No odbxtest.site file found"
+	exit 1
 fi
 
 ODBXAPP="./odbxtest ./odbxplustest"
@@ -28,6 +29,7 @@
 		echo "$1 ERRORS:" >> testresult.err
 		cat test.err >> testresult.err
 		diff -b test.out ref/$1.ref >> testresult.err
+		FAILURE="FAILED"
 	else
 		echo "  $1 OK"
 		echo "  $1 OK" >> testresult.log
@@ -154,5 +156,9 @@
 rm -f test.out
 rm -f test.err
 
-
-exit 0
+if [ -n "$FAILURE" ]
+then
+	exit 1
+else
+	exit 0
+fi