591
|
1 |
|
|
2 |
# This FLM is for testing the retry mechanism in our rules.
|
|
3 |
# It will fail on the first FAILURES invocations and then succeed.
|
|
4 |
|
|
5 |
MY_COUNTER:=$(EPOCROOT)/epoc32/build/$(COUNTER)
|
|
6 |
|
|
7 |
define retry_test
|
|
8 |
ALL::
|
|
9 |
$(call startrule,retry_test) \
|
|
10 |
(TRY=1; \
|
|
11 |
while (( $$$$TRY <= $(FAILURES) )); do \
|
|
12 |
if [ ! -f $(MY_COUNTER).$$$$TRY ]; then \
|
|
13 |
touch $(MY_COUNTER).$$$$TRY; \
|
|
14 |
echo DELIBERATE FAILURE $$$$TRY for $(COUNTER); \
|
|
15 |
exit 1; \
|
|
16 |
fi; \
|
|
17 |
(( TRY=$$$$TRY + 1 )); \
|
|
18 |
done) && \
|
|
19 |
echo SUCCESS for $(COUNTER) && \
|
|
20 |
touch $(MY_COUNTER).ok \
|
|
21 |
$(call endrule,retry_test)
|
|
22 |
endef
|
|
23 |
$(eval $(retry_test))
|