]> git.ozlabs.org Git - petitboot/blobdiff - devices/parser-test.sh
Move path maniuplation functions to devices/paths.c
[petitboot] / devices / parser-test.sh
index 351dc75a5bab3e9c0571255f3388e3f13529edb1..cdd814b7c13b53fe35e91fe42cde9b9600f508ff 100755 (executable)
@@ -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" -
 }