From 69c343afb914f1fdf17c082772bd83be28e0a56b Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sat, 10 Jun 2017 14:57:47 +0200 Subject: [PATCH] test: exit with non-zero status when some root-test fail --- test/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/Makefile b/test/Makefile index 9a61acb..eefa382 100644 --- a/test/Makefile +++ b/test/Makefile @@ -52,10 +52,11 @@ repos.stamp: $(repos) root-tests: repos.stamp @echo "== Testing `$(APK) --version` (tests that require root permission) ==" - @for i in test*.sh; do \ + @failed=0; for i in test*.sh; do \ rm -f $${i%.sh}.ok ;\ - $(SUDO) $(MAKE) --no-print-directory $${i%.sh}.ok SYSREPO=$(SYSREPO); \ - done + $(SUDO) $(MAKE) --no-print-directory $${i%.sh}.ok SYSREPO=$(SYSREPO) || failed=1; \ + done; \ + return $$failed tests: @echo "== Testing `$(APK) --version` =="