summaryrefslogtreecommitdiff
path: root/test/test.sh
blob: 91dddbd0b450e73acc3849bc343b3f58ab40cbb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

fail="none"

for i in test-* ; do
	if [[ "$i" != *.* ]] ; then
		echo -n "$i: "
		if ./"$i" >"$i.stdout.log" 2>"$i.stderr.log" ; then
			echo -e '[\e[0;32mPASS\e[0m]'
		else
			echo -e '[\e[1;31mFAIL\e[0m]'
			fail="indeed"
		fi
	fi
done

if [ "$fail" != "none" ] ; then
	echo 'Test failure(s)'
	exit 1
else
	echo Success
	exit 0
fi