2011-08-11 12:57:44 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
function usage {
|
2011-10-13 13:43:16 -05:00
|
|
|
echo "Usage: [OPTIONS] [SUITES]"
|
|
|
|
echo "Run all of the test suites"
|
2011-08-11 12:57:44 -05:00
|
|
|
echo ""
|
|
|
|
echo " -h, --help Print this usage message"
|
|
|
|
echo ""
|
2011-10-13 13:43:16 -05:00
|
|
|
echo " The suites should be listed by the name of their directory."
|
|
|
|
echo " All other options are passed directly to the suites."
|
2011-08-11 12:57:44 -05:00
|
|
|
exit
|
|
|
|
}
|
|
|
|
|
|
|
|
function process_option {
|
|
|
|
case "$1" in
|
|
|
|
-h|--help) usage;;
|
2011-10-13 13:43:16 -05:00
|
|
|
-*|--*) test_opts="$test_opts $1";;
|
|
|
|
*) tests="$tests $1"
|
2011-08-11 12:57:44 -05:00
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
for arg in "$@"; do
|
|
|
|
process_option $arg
|
|
|
|
done
|
|
|
|
|
2011-10-13 13:43:16 -05:00
|
|
|
echo $test_opts
|
2011-08-11 12:57:44 -05:00
|
|
|
|
2011-10-13 13:43:16 -05:00
|
|
|
function run_tests {
|
2011-10-18 10:27:02 -05:00
|
|
|
base_dir=$(dirname $0)
|
2011-10-13 13:43:16 -05:00
|
|
|
for test_dir in $tests
|
|
|
|
do
|
2011-10-18 10:27:02 -05:00
|
|
|
test_cmd="${base_dir}/${test_dir}/run_tests.sh ${test_opts}"
|
2011-10-13 13:43:16 -05:00
|
|
|
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
|
|
|
echo $test_cmd
|
|
|
|
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
|
|
|
$test_cmd
|
2011-10-18 10:27:02 -05:00
|
|
|
|
2011-10-13 13:43:16 -05:00
|
|
|
done
|
2011-08-11 12:57:44 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
run_tests || exit
|