From 350c76f847caff3dd557e07b46ae6402f8d363ee Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Thu, 3 Sep 2015 12:59:20 +0200 Subject: [PATCH] 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 --- test/extension/test.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/extension/test.sh b/test/extension/test.sh index ff9de57..ceeb73b 100755 --- a/test/extension/test.sh +++ b/test/extension/test.sh @@ -227,7 +227,12 @@ function run_tests() { local TESTS if [[ $# -ge 1 ]] then - TESTS="$@" + 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