Bläddra i källkod

Explain error if web crashes in acceptance tests

James Allen 8 år sedan
förälder
incheckning
f57290382d
1 ändrade filer med 5 tillägg och 1 borttagningar
  1. 5 1
      services/web/Makefile

+ 5 - 1
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; \