]> git.ozlabs.org Git - petitboot/blob - devices/parser-test.sh
351dc75a5bab3e9c0571255f3388e3f13529edb1
[petitboot] / devices / parser-test.sh
1 #!/bin/bash
2
3 testdir=devices/parser-tests
4
5 function test_dir()
6 {
7         dir="$1"
8         ./parser-test "$dir" 2>/dev/null |
9                 diff -u "$dir/expected-output" -
10 }
11
12 set -ex
13
14 for test in $testdir/*
15 do
16         echo $test
17         test_dir "$test"
18 done
19
20 echo "All tests passed"