diff --git a/make/Global.gmk b/make/Global.gmk index 618e9ca243993..b41c4051cfafd 100644 --- a/make/Global.gmk +++ b/make/Global.gmk @@ -125,6 +125,11 @@ test-prebuilt: $(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \ test-prebuilt CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" ) +test-prebuilt-with-exit-code: + @( cd $(topdir) && \ + $(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \ + test-prebuilt-with-exit-code CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" ) + # Alias for backwards compatibility run-test-prebuilt: test-prebuilt diff --git a/make/RunTestsPrebuilt.gmk b/make/RunTestsPrebuilt.gmk index 85c6bae63993a..ca20ccf26ad20 100644 --- a/make/RunTestsPrebuilt.gmk +++ b/make/RunTestsPrebuilt.gmk @@ -295,6 +295,11 @@ test-prebuilt: @cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -f make/RunTests.gmk run-test \ TEST="$(TEST)" +test-prebuilt-with-exit-code: test-prebuilt + @if test -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error ; then \ + exit 1 ; \ + fi + all: test-prebuilt .PHONY: default all test-prebuilt