summaryrefslogtreecommitdiff
path: root/test/test.sh
blob: 5c46f8bffeba81b5b81177ad81bcc61649fa00b2 (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 bin/test-* ; do
	if [[ "$i" != *.* ]] ; then
		if ./"$i" >"$i.stdout.log" 2>"$i.stderr.log" ; then
			echo -ne '[\e[0;32mPASS\e[0m]'
		else
			echo -ne '[\e[1;31mFAIL\e[0m]'
			fail="indeed"
		fi
		echo " $i"
	fi
done

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