File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change 8
8
WORKSPACE=$1
9
9
BUILD_DIR=$2
10
10
TOOL=$3
11
+ TESTS=$4
11
12
12
13
function print_usage() {
13
- echo " $( basename $0 ) - run all UMF tests and examples under a valgrind tool (memcheck, drd or helgrind)"
14
- echo " This script looks for './test/umf_test-*' and './examples/umf_example_*' executables in the UMF build directory."
15
- echo " Usage: $( basename $0 ) <workspace_dir> <build_dir> <memcheck|drd|helgrind>"
14
+ echo " $( basename $0 ) - run UMF tests and examples under a valgrind tool (memcheck, drd or helgrind)"
15
+ echo " Usage: $( basename $0 ) <workspace_dir> <build_dir> <memcheck|drd|helgrind> [tests_examples]"
16
+ echo " Where:"
17
+ echo
18
+ echo " tests_examples - (optional) list of tests or examples to be run (paths relative to the <build_dir> build directory)."
19
+ echo " If it is empty, all tests (./test/umf_test-*) and examples (./examples/umf_example_*)"
20
+ echo " found in <build_dir> will be run."
16
21
}
17
22
18
23
if ! valgrind --version > /dev/null; then
@@ -71,7 +76,14 @@ echo "Running: \"valgrind $OPTION\" for the following tests:"
71
76
ANY_TEST_FAILED=0
72
77
rm -f umf_test-* .log umf_test-* .err
73
78
74
- for test in $( ls -1 ./test/umf_test-* ./examples/umf_example_* ) ; do
79
+ [ " $TESTS " = " " ] && TESTS=$( ls -1 ./test/umf_test-* ./examples/umf_example_* )
80
+
81
+ for test in $TESTS ; do
82
+ if [ ! -f $test ]; then
83
+ echo
84
+ echo " error: the $test (${BUILD_DIR} /$test ) file does not exist"
85
+ exit 1
86
+ fi
75
87
[ ! -x $test ] && continue
76
88
echo " $test - starting ..."
77
89
echo -n " $test "
You can’t perform that action at this time.
0 commit comments