Make regressiontest reproducable

This commit is contained in:
Moritz 'Morty' Strübe 2013-10-31 17:34:11 +01:00
parent 56afc6d437
commit c89e827d6c

View file

@ -30,6 +30,8 @@ TESTS=$(wildcard ??-*.csc)
TESTLOGS=$(patsubst %.csc,%.testlog,$(TESTS))
LOGS=$(patsubst %.csc,%.log,$(TESTS))
FAILLOGS=$(patsubst %.csc,%.faillog,$(TESTS))
#Set random seed to create reproduceable results.
RANDOMSEED=1
CONTIKI=../..
@ -57,7 +59,7 @@ endif
%.testlog: %.csc cooja
@echo -n Running test $(basename $<) ... ""
@(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; \
tail -50 COOJA.log; \
mv COOJA.testlog $(basename $<).faillog; \