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

testdir=devices/parser-tests
default_rootdev=ps3da1

function test_dir()
{
	dir="$1"
	rootdev=$default_rootdev
	if [ -e "$dir/rootdev" ]
	then
		rootdev=$(cat "$dir/rootdev")
	fi
	./parser-test "$dir" /dev/$rootdev 2>/dev/null |
		diff -u "$dir/expected-output" -
}

set -ex

for test in $testdir/*
do
	echo $test
	test_dir "$test"
done

echo "All tests passed"
OpenPOWER on IntegriCloud