From 213974ff32fee625f9234efb345806ea218dfe1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Mon, 22 Jun 2020 11:53:50 +0200 Subject: core/test.mk: Abort build if a test file fails to compile In commit c55d0dcd6182983521d4ab34478cfe4b093edb12, the recipe was improved to only rebuild out-of-date test files (not everything as it was the case before). However in the process, the exit status of the Erlang compiler was not checked anymore, leading to build failures in the test directory to be ignored. This patch fixes this bug. --- test/core_app.mk | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/core_app.mk b/test/core_app.mk index 7abb9e9..effc598 100644 --- a/test/core_app.mk +++ b/test/core_app.mk @@ -2786,3 +2786,9 @@ core-app-test-build-outofdate-files-only: init $t $(MAKE) -C $(APP) test-build $v $t test $(APP)/test/use_blue.beam -nt $(APP)/build-2 $t test $(APP)/test/use_red.beam -nt $(APP)/build-2 + + $i "Add a syntax error to the test; check that the build fails" + $t $(SLEEP) + $t echo "garbage" >> $(APP)/test/use_blue.erl + $t ! $(MAKE) -C $(APP) test-build $v + $t ! test -f $(APP)/test/use_blue.beam -- cgit v1.2.3