summaryrefslogtreecommitdiffstats
path: root/test/parser-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/parser-test.sh')
-rwxr-xr-xtest/parser-test.sh29
1 files changed, 14 insertions, 15 deletions
diff --git a/test/parser-test.sh b/test/parser-test.sh
index 140601e..af54395 100755
--- a/test/parser-test.sh
+++ b/test/parser-test.sh
@@ -1,26 +1,25 @@
#!/bin/bash
-testdir=devices/parser-tests
+testdir=parser
default_rootdev=ps3da1
+mnt=${PREFIX}/var/petitboot/mnt
-function test_dir()
-{
- dir="$1"
+#set -ex
+
+tests=$(ls ${mnt}/${testdir}/)
+
+for test in $tests
+do
rootdev=$default_rootdev
- if [ -e "$dir/rootdev" ]
- then
- rootdev=$(cat "$dir/rootdev")
+
+ if [ -e "${mnt}/${testdir}/$test/rootdev" ]; then
+ rootdev=$(cat "${mnt}/${testdir}/$test/rootdev")
fi
- ./parser-test "$dir" /dev/$rootdev 2>/dev/null |
- diff -u "$dir/expected-output" -
-}
-set -ex
+ ./test/parser-test "${testdir}/$test" $rootdev
-for test in $testdir/*
-do
- echo $test
- test_dir "$test"
+# ./test/parser-test "${testdir}/$test" $rootdev 2>/dev/null |
+# diff -u "${mnt}/${testdir}/$test/expected-output" -
done
echo "All tests passed"
OpenPOWER on IntegriCloud