Make regressiontest reproducable
This commit is contained in:
parent
56afc6d437
commit
c89e827d6c
|
@ -30,6 +30,8 @@ TESTS=$(wildcard ??-*.csc)
|
||||||
TESTLOGS=$(patsubst %.csc,%.testlog,$(TESTS))
|
TESTLOGS=$(patsubst %.csc,%.testlog,$(TESTS))
|
||||||
LOGS=$(patsubst %.csc,%.log,$(TESTS))
|
LOGS=$(patsubst %.csc,%.log,$(TESTS))
|
||||||
FAILLOGS=$(patsubst %.csc,%.faillog,$(TESTS))
|
FAILLOGS=$(patsubst %.csc,%.faillog,$(TESTS))
|
||||||
|
#Set random seed to create reproduceable results.
|
||||||
|
RANDOMSEED=1
|
||||||
|
|
||||||
CONTIKI=../..
|
CONTIKI=../..
|
||||||
|
|
||||||
|
@ -57,7 +59,7 @@ endif
|
||||||
%.testlog: %.csc cooja
|
%.testlog: %.csc cooja
|
||||||
@echo -n Running test $(basename $<) ... ""
|
@echo -n Running test $(basename $<) ... ""
|
||||||
@(java -Xshare:on -jar $(CONTIKI)/tools/cooja/dist/cooja.jar \
|
@(java -Xshare:on -jar $(CONTIKI)/tools/cooja/dist/cooja.jar \
|
||||||
-nogui=$< -contiki=$(CONTIKI) > $(basename $@).log || \
|
-nogui=$< -contiki=$(CONTIKI) -random-seed=$(RANDOMSEED) > $(basename $@).log || \
|
||||||
(echo " FAIL ಠ_ಠ" | tee -a COOJA.testlog; \
|
(echo " FAIL ಠ_ಠ" | tee -a COOJA.testlog; \
|
||||||
tail -50 COOJA.log; \
|
tail -50 COOJA.log; \
|
||||||
mv COOJA.testlog $(basename $<).faillog; \
|
mv COOJA.testlog $(basename $<).faillog; \
|
||||||
|
|
Loading…
Reference in a new issue