forked from PlusToolkit/PlusBuild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BuildAndTest.sh.in
executable file
·54 lines (45 loc) · 1.22 KB
/
BuildAndTest.sh.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
ORIGPATH=$PATH
DIRCMD=0
command=$0
if [ "$1" == "-E" ] || [ "$1" == "-N" ] || [ "$1" == "-C" ] || [ "$1" == "-I" ]; then
test_mode=$1
shift
else
test_mode="-E"
fi
test_track=""
individual_test=""
while [ "${1:-}" != "" ]; do
case "$1" in
"--test")
shift
individial_test=$1
;;
"--track")
shift
test_track="--track \"$1\""
;;
esac
shift
done
if [ "$test_mode" == "" ] || [ "$test_mode" == "-E" ]; then
"@CMAKE_CTEST_COMMAND@" -C Release -D Experimental --output-on-failure --build-and-test $test_track
fi
if [ "$test_mode" == "-N" ]; then
"@CMAKE_CTEST_COMMAND@" -C Release -D Nightly --build-and-test $test_track
fi
if [ "$test_mode" == "-C" ]; then
"@CMAKE_CTEST_COMMAND@" -C Release -D Continuous --build-and-test $test_track
# Wait for some time before continue to allow checking the results of the executions
sleep 15
fi
if [ "$test_mode" == "-I" ]; then
# Run individual tests with regexp search
# Display the list of tests
"@CMAKE_CTEST_COMMAND@" -C Release -R "$individial_test" -N
# Run selected tests
"@CMAKE_CTEST_COMMAND@" -C Release -R "$individial_test" -V
fi
PATH=$ORIGPATH
echo "DONE"