From f57290382d534c0703d21213b56c38500d361eb6 Mon Sep 17 00:00:00 2001 From: James Allen Date: Wed, 13 Jun 2018 10:11:38 +0100 Subject: [PATCH 1/2] Explain error if web crashes in acceptance tests --- services/web/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/web/Makefile b/services/web/Makefile index bfdfc0f52f..a442ca0045 100644 --- a/services/web/Makefile +++ b/services/web/Makefile @@ -207,7 +207,11 @@ test_acceptance_app_stop_service: docker-compose ${DOCKER_COMPOSE_FLAGS} stop -t 0 test_acceptance redis mongo test_acceptance_app_run: - docker-compose ${DOCKER_COMPOSE_FLAGS} exec -T test_acceptance npm -q run test:acceptance -- ${MOCHA_ARGS} + @docker-compose ${DOCKER_COMPOSE_FLAGS} exec -T test_acceptance npm -q run test:acceptance -- ${MOCHA_ARGS}; \ + if [ $$? -eq 137 ]; then \ + echo "\nOh dear, it looks like the web process crashed! Run:\n\n\tdocker-compose logs test_acceptance\n\nto see why"; \ + exit 1; \ + fi test_acceptance_modules: @set -e; \ From 76d10e64025f7b114f7255f0440ac3e7737e757a Mon Sep 17 00:00:00 2001 From: James Allen Date: Wed, 13 Jun 2018 10:40:36 +0100 Subject: [PATCH 2/2] Improve error message readability --- services/web/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/Makefile b/services/web/Makefile index a442ca0045..83b9075c8a 100644 --- a/services/web/Makefile +++ b/services/web/Makefile @@ -209,7 +209,7 @@ test_acceptance_app_stop_service: test_acceptance_app_run: @docker-compose ${DOCKER_COMPOSE_FLAGS} exec -T test_acceptance npm -q run test:acceptance -- ${MOCHA_ARGS}; \ if [ $$? -eq 137 ]; then \ - echo "\nOh dear, it looks like the web process crashed! Run:\n\n\tdocker-compose logs test_acceptance\n\nto see why"; \ + echo "\nOh dear, it looks like the web process crashed! To see why, run:\n\n\tdocker-compose logs test_acceptance\n"; \ exit 1; \ fi