X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=devices%2Fparser-test.sh;fp=devices%2Fparser-test.sh;h=cdd814b7c13b53fe35e91fe42cde9b9600f508ff;hp=351dc75a5bab3e9c0571255f3388e3f13529edb1;hb=dbacb44c0ebb587b5cfcbbf84c770502c217473a;hpb=02aeee42aebbb3a7098b6e0fc570522f9d44de96 diff --git a/devices/parser-test.sh b/devices/parser-test.sh index 351dc75..cdd814b 100755 --- a/devices/parser-test.sh +++ b/devices/parser-test.sh @@ -1,11 +1,17 @@ #!/bin/bash testdir=devices/parser-tests +default_rootdev=ps3da1 function test_dir() { dir="$1" - ./parser-test "$dir" 2>/dev/null | + rootdev=$default_rootdev + if [ -e "$dir/rootdev" ] + then + rootdev=$(cat "$dir/rootdev") + fi + ./parser-test "$dir" $rootdev 2>/dev/null | diff -u "$dir/expected-output" - }