summaryrefslogtreecommitdiff
path: root/src/aif-test.sh
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2009-07-21 22:11:47 +0200
committerDieter Plaetinck <dieter@plaetinck.be>2009-07-21 22:11:47 +0200
commit3bd20bde1e49ab664cc53262ec5ebb3e6323d3f6 (patch)
treebd7e686e44c3f4e62dc83712b7be94b0e550d204 /src/aif-test.sh
parentd982d8e1f9e6b806d44340ca28858e388a1fded7 (diff)
make tests separate reusable files + make the testing thing a bit better
Diffstat (limited to 'src/aif-test.sh')
-rwxr-xr-xsrc/aif-test.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/aif-test.sh b/src/aif-test.sh
index 4d2110e..f0a666c 100755
--- a/src/aif-test.sh
+++ b/src/aif-test.sh
@@ -1,11 +1,14 @@
#!/bin/bash
+# make sure you install aif onto the target system so you can use its testing libraries
+
echo "Aif-test: a 'unit-testing' tool for AIF"
echo " for a list of available tests: find /usr/share/aif/tests/"
-[ "$1" != runtime] && echo "\$1: type of test to execute (runtime. no support for buildtime yet)" >&2 && exit 1
-[ -z "$2" ] && echo "\$2: name of test to execute" >&2 && exit 1
+[ "$1" != runtime ] && echo "\$1: type of test to execute (runtime. no support for buildtime yet)" >&2 && exit 1
+[ -z "$2" ] && echo "\$2: name of test to execute" >&2 && exit 1
test_dir="/usr/share/aif/tests/$1/$2"
+
[ ! -d "$test_dir" ] && echo "No such test found: $test_dir" >&2 && exit 2
echo "Running test $test_dir. THIS WILL PROBABLY ERASE DATA ON ONE OR MORE OF YOUR HARD DISKS. TO ABORT PRESS CTRL-C WITHIN 10 SECONDS"