aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/maketests.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/maketests.in')
-rwxr-xr-xscripts/maketests.in21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/maketests.in b/scripts/maketests.in
new file mode 100755
index 000000000..f9cafed26
--- /dev/null
+++ b/scripts/maketests.in
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+if [ $# == 0 -o $# -ge 3 ]
+then
+ echo "usage: ./maketests regexp [jobs]"
+ echo " makes tests matching the regexp, with <jobs> concurrent make jobs"
+ exit 0
+fi
+
+TESTSLIST="${cmake_tests_list}"
+targets_to_make=`echo "$TESTSLIST" | grep "$1" | sed s/^/test_/g | xargs`
+
+if [ $# == 1 ]
+then
+ make $targets_to_make
+fi
+
+if [ $# == 2 ]
+then
+ make -j $2 $targets_to_make
+fi