X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=devices%2Fparser-test.sh;fp=devices%2Fparser-test.sh;h=351dc75a5bab3e9c0571255f3388e3f13529edb1;hp=0000000000000000000000000000000000000000;hb=81aa8fc95444b14e427befa5b03f52388f64e21c;hpb=827e0b3bdfaf4a218e1d75cb9e6a52ec097a3a38 diff --git a/devices/parser-test.sh b/devices/parser-test.sh new file mode 100755 index 0000000..351dc75 --- /dev/null +++ b/devices/parser-test.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +testdir=devices/parser-tests + +function test_dir() +{ + dir="$1" + ./parser-test "$dir" 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"