File tree 3 files changed +13
-12
lines changed
3 files changed +13
-12
lines changed Original file line number Diff line number Diff line change 3
3
mongod &
4
4
MONGOD_PID=$!
5
5
6
- unitd --control " *:8888" --no-daemon --log /dev/stdout
6
+ exec unitd --control " *:8888" --no-daemon --log /dev/stdout
Original file line number Diff line number Diff line change @@ -97,15 +97,23 @@ clean_up() {
97
97
set +e
98
98
99
99
log " INFO: Test return code = $TEST_RESULT_CODE "
100
- if [ " ${TEST_RESULT_CODE} " != " 0" ]; then
100
+ if [ " ${TEST_RESULT_CODE} " = " 0" ]; then
101
+ # Copy unit test coverage
102
+ docker cp scitran-core-test-runner:/src/core/.coverage .coverage.unit-tests
103
+
104
+ # Gracefully stop API then copy integration test coverage
105
+ # TODO added exec to dev+mongo.sh and tried (TERM|KILL|INT|QUIT) signals to no avail
106
+ # Somehow api.web.start/save_coverage() (atexit) is NOT triggered
107
+ # docker kill --signal=SIGTERM scitran-core-test-service
108
+ # docker cp scitran-core-test-service:/src/core/.coverage.integration-tests ./
109
+
110
+ # TODO report/combine/htmlize coverage using a test container
111
+ else
101
112
log " INFO: Printing container logs..."
102
113
docker logs scitran-core-test-service
103
114
log " ERROR: Test return code = $TEST_RESULT_CODE . Container logs printed above."
104
115
fi
105
116
106
- # Copy coverage file to host for possible further reporting
107
- docker cp scitran-core-test-runner:/src/core/.coverage .coverage
108
-
109
117
# Spin down dependencies
110
118
docker rm -f -v scitran-core-test-runner
111
119
docker rm -f -v scitran-core-test-service
Original file line number Diff line number Diff line change @@ -115,13 +115,6 @@ main() {
115
115
abao ../../api.raml " --server=$SCITRAN_SITE_API_URL " " --hookfiles=../../../tests/integration_tests/abao/abao_test_hooks.js"
116
116
cd $BASEDIR
117
117
fi
118
-
119
- if ${RUN_ALL} ; then
120
- log " OVERALL COVERAGE:"
121
- coverage combine
122
- coverage report --show-missing
123
- coverage html
124
- fi
125
118
}
126
119
127
120
You can’t perform that action at this time.
0 commit comments