summaryrefslogtreecommitdiff
path: root/tests/run_tests.sh
blob: 889f5f4ae5317d1a650b00595adb5acc6c6b35c2 (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
#!/bin/bash

if [ ! -f run_tests.sh ]
then
	echo "Test suite needs to be run from the tests directory" 1>&2
	exit 1
fi

if [ ! -f test_lib.sh ]
then
	echo "Could not find test_lib.sh" 1>&2
	exit 1
fi

ALLTESTSDIR=`pwd`

for i in [0-9][0-9]*
do
	cd $ALLTESTSDIR
	fakeroot -- ./$i ../tbdiff-create ../tbdiff-deploy
	if [ $? -ne 0 ]
	then
		echo "Test program $i failed" 1>&2
		cd $ALLTESTSDIR
		exit 1
	fi
done