summaryrefslogtreecommitdiffstats
path: root/test/parser-test.sh
blob: af54395215ed57d754ea33614881aedc7aa05fbb (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
#!/bin/bash

testdir=parser
default_rootdev=ps3da1
mnt=${PREFIX}/var/petitboot/mnt

#set -ex

tests=$(ls ${mnt}/${testdir}/)

for test in $tests
do
	rootdev=$default_rootdev

	if [ -e "${mnt}/${testdir}/$test/rootdev" ]; then
		rootdev=$(cat "${mnt}/${testdir}/$test/rootdev")
	fi

	./test/parser-test "${testdir}/$test" $rootdev

#	./test/parser-test "${testdir}/$test" $rootdev 2>/dev/null |
#		diff -u "${mnt}/${testdir}/$test/expected-output" -
done

echo "All tests passed"
OpenPOWER on IntegriCloud