Add option to run tests by prefix

`bash test/extension/test.sh test_cdb_querytables`
will run all tests that start with test_cdb_querytables
This commit is contained in:
Raul Ochoa 2015-09-03 12:59:20 +02:00
parent 4fe85a6a76
commit 350c76f847

View File

@ -227,7 +227,12 @@ function run_tests() {
local TESTS
if [[ $# -ge 1 ]]
then
if [[ $# -eq 1 ]]
then
TESTS=`cat $0 | grep -o "$1[^\(]*"`
else
TESTS="$@"
fi
else
TESTS=`cat $0 | perl -n -e'/function (test.*)\(\)/ && print "$1\n"'`
fi