]> git.ozlabs.org Git - petitboot/blob - test/parser-test.sh
Fix seg fault with bare kboot.conf variables
[petitboot] / test / parser-test.sh
1 #!/bin/bash
2
3 testdir=parser
4 default_rootdev=ps3da1
5 mnt=${PREFIX}/var/petitboot/mnt
6
7 #set -ex
8
9 tests=$(ls ${mnt}/${testdir}/)
10
11 for test in $tests
12 do
13         rootdev=$default_rootdev
14
15         if [ -e "${mnt}/${testdir}/$test/rootdev" ]; then
16                 rootdev=$(cat "${mnt}/${testdir}/$test/rootdev")
17         fi
18
19         ./test/parser-test "${testdir}/$test" $rootdev
20
21 #       ./test/parser-test "${testdir}/$test" $rootdev 2>/dev/null |
22 #               diff -u "${mnt}/${testdir}/$test/expected-output" -
23 done
24
25 echo "All tests passed"