You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2019/07/29 17:59:29 UTC
[couchdb] branch master updated: Retry EUnit tests on failure
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/master by this push:
new 220462a Retry EUnit tests on failure
220462a is described below
commit 220462a1dd2d921fc4ecba3488f5fedefb75217f
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Fri Jul 26 19:52:19 2019 -0400
Retry EUnit tests on failure
Whole app is retried 2 extra times if it fails.
Added to *nix Makefile only for now. May not be needed for Windows as this is
for CI flakiness mostly.
---
Makefile | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 58c8148..ed22509 100644
--- a/Makefile
+++ b/Makefile
@@ -170,8 +170,18 @@ eunit: export COUCHDB_QUERY_SERVER_JAVASCRIPT = $(shell pwd)/bin/couchjs $(shell
eunit: couch
@$(REBAR) setup_eunit 2> /dev/null
@for dir in $(subdirs); do \
- $(REBAR) -r eunit $(EUNIT_OPTS) apps=$$dir || exit 1; \
- done
+ tries=0; \
+ while true; do \
+ $(REBAR) -r eunit $(EUNIT_OPTS) apps=$$dir ; \
+ if [ $$? -eq 0 ]; then \
+ break; \
+ else \
+ let "tries=tries+1"; \
+ [ $$tries -gt 2 ] && exit 1; \
+ fi \
+ done \
+ done
+
.PHONY: exunit
# target: exunit - Run ExUnit tests