From 3bd20bde1e49ab664cc53262ec5ebb3e6323d3f6 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Tue, 21 Jul 2009 22:11:47 +0200 Subject: make tests separate reusable files + make the testing thing a bit better --- src/aif-test.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/aif-test.sh') 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" -- cgit v1.2.3-54-g00ecf