forked from cucumber/cucumber-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-all.sh
executable file
·71 lines (59 loc) · 1.55 KB
/
run-all.sh
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/sh
set -e #break script on non-zero exitcode from any command
set -x #display command being executed
CTEST_OUTPUT_ON_FAILURE=ON
export CTEST_OUTPUT_ON_FAILURE
cmake -E make_directory build
cmake -E chdir build cmake \
-G Ninja \
-DCUKE_ENABLE_BOOST_TEST=on \
-DCUKE_ENABLE_GTEST=on \
-DCUKE_ENABLE_QT_6=on \
-DCUKE_ENABLE_EXAMPLES=on \
-DCUKE_TESTS_UNIT=on \
-DCUKE_CODE_COVERAGE=on \
..
cmake --build build --parallel
#
# Run tests
#
cmake --build build --target test
#
# Execute Calc examples
#
for TEST in \
build/examples/Calc/GTestCalculatorSteps \
build/examples/Calc/QtTestCalculatorSteps \
build/examples/Calc/BoostCalculatorSteps \
build/examples/Calc/FuncArgsCalculatorSteps \
; do
"${TEST}" > /dev/null &
sleep 1
(cd examples/Calc; cucumber)
wait %
done
#
# Execute QtCalc examples
#
for TEST in \
build/examples/CalcQt/GTestCalculatorQtSteps \
build/examples/CalcQt/QtTestCalculatorQtSteps \
build/examples/CalcQt/BoostCalculatorQtSteps \
; do
"${TEST}" 2> /dev/null &
sleep 1
(cd examples/CalcQt; cucumber)
wait %
done
#
# Execute feature showcase on Unix socket
#
SOCK=`pwd`/cucumber.wire.sock
TEST=build/examples/FeatureShowcase/FeatureShowcaseSteps
echo "unix: ${SOCK}" > examples/FeatureShowcase/features/step_definitions/cucumber.wire
"${TEST}" --unix "${SOCK}" > /dev/null &
(cd examples/FeatureShowcase; cucumber)
wait %
mkdir -p coverage
gcovr build/ --html-details --output coverage/index.html --xml coverage/cobertura.xml
sudo cmake --install build