Skip to content

Instantly share code, notes, and snippets.

@polvalente
Created September 21, 2018 04:47
Show Gist options
  • Save polvalente/c25e0405d2cf66a067fd3b30ef7f5b67 to your computer and use it in GitHub Desktop.
Save polvalente/c25e0405d2cf66a067fd3b30ef7f5b67 to your computer and use it in GitHub Desktop.
Make test with retry
TEST_COUNT ?= 4
test:
ifeq ($(TEST_COUNT), 2)
exit 0;
else
exit 1;
endif
retry-test:
ifeq ($(TEST_COUNT),-1)
exit 1;
else
@echo "Running test $(TEST_COUNT)"
@make test || TEST_COUNT=$(shell echo ${TEST_COUNT}-1 | bc) make retry-test
endif
@polvalente
Copy link
Author

No caso, test seria a sua rotina de teste automatizado de fato.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment