Commits

Oben Sonne  committed b3e4f3a

Test suite

  • Participants
  • Parent commits 9d3ce7d

Comments (0)

Files changed (1)

File tests/run-tests.sh

 
 TESTS="test-compass.sh"
 
-for tf in $TESTS ; do
+EXIT=0
+
+for TF in $TESTS ; do
 	
-	name=`echo $tf | sed -r "s/\.(sh)|(py)$//"`
+	NAME=`echo $TF | sed -r "s/\.(sh)|(py)$//"`
 	
-	echo -n "Running $name .. "
+	echo -n "Running $NAME .. "
 	
-	./$tf > $name.act
+	./$TF > $NAME.act
 	
-	DIFF="`diff -Nur $name.exp $name.act`"
+	DIFF="`diff -Nur $NAME.exp $NAME.act`"
 	
 	if [ -n "$DIFF" ] ; then
-		echo "failed, see $name.diff"
-		echo "$DIFF" > $name.diff
+		echo "failed, see $NAME.diff"
+		echo "$DIFF" > $NAME.diff
+		EXIT=1
 	else
 		echo "success" 
 	fi
 	
 done
+
+exit $EXIT