test: exit with non-zero status when some root-test fail

cute-signatures
Jakub Jirutka 2017-06-10 14:57:47 +02:00
parent d6ef8fbe23
commit 69c343afb9
1 changed files with 4 additions and 3 deletions

View File

@ -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` =="