summaryrefslogtreecommitdiffstats
path: root/test/parser-test.sh
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2009-03-25 12:35:59 +0000
committerJeremy Kerr <jk@ozlabs.org>2009-03-30 20:20:16 +1100
commitfe7bfb4f2fa5b582be94409473130674b7d8687f (patch)
tree847cd456693a5253b5df7502fc84473e7232819a /test/parser-test.sh
parent8a939f0de36db6316e0872b7263408b2dc9b83ea (diff)
downloadtalos-petitboot-fe7bfb4f2fa5b582be94409473130674b7d8687f.tar.gz
talos-petitboot-fe7bfb4f2fa5b582be94409473130674b7d8687f.zip
Fixup parser test program
Fixup the parser test program and helper script to work with the new multi-ui design. The expected-output files have not been updated. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
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