2017-03-29 14:05:55 +00:00
|
|
|
TRICK_HOME := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))..)
|
2016-02-24 14:52:25 +00:00
|
|
|
export TRICK_HOST_CPU := $(shell $(TRICK_HOME)/bin/trick-gte TRICK_HOST_CPU)
|
|
|
|
|
|
|
|
# List out sims we want to compile
|
|
|
|
COMPILE_DIRS = \
|
2017-08-04 20:05:52 +00:00
|
|
|
SIM_demo_sdefine \
|
|
|
|
SIM_events \
|
|
|
|
SIM_rti \
|
|
|
|
SIM_stls \
|
|
|
|
SIM_test_dp \
|
|
|
|
SIM_test_dr \
|
|
|
|
SIM_test_io \
|
|
|
|
SIM_test_ip \
|
|
|
|
SIM_test_sched \
|
|
|
|
SIM_test_templates \
|
|
|
|
SIM_threads
|
2016-02-24 14:52:25 +00:00
|
|
|
|
|
|
|
SIMS_NEEDING_TEST = \
|
2017-08-04 20:05:52 +00:00
|
|
|
SIM_alloc_test \
|
|
|
|
SIM_demo_inputfile \
|
|
|
|
SIM_measurement_units \
|
|
|
|
SIM_test_abstract \
|
|
|
|
SIM_test_inherit \
|
|
|
|
SIM_test_ip2 \
|
|
|
|
SIM_threads_simple \
|
|
|
|
SIM_trickcomm
|
2016-02-24 14:52:25 +00:00
|
|
|
|
|
|
|
# Sims with problems, no purpose, or maybe shouldn't be a test
|
2016-02-24 15:46:04 +00:00
|
|
|
# SIM_leaks ( should be deleted )
|
|
|
|
# SIM_test_varserv ( not sure what it is testing )
|
|
|
|
# SIM_dynamic_sim_object ( not running, class won't instantiate )
|
|
|
|
# SIM_segments ( not a test, but a demo )
|
2016-02-24 14:52:25 +00:00
|
|
|
|
|
|
|
# This test is temporarily sitting out until fixed.
|
|
|
|
# SIM_test_varserv
|
|
|
|
|
|
|
|
EXECUTABLES = $(addsuffix /T_main_${TRICK_HOST_CPU}_test.exe, $(COMPILE_DIRS) $(SIMS_NEEDING_TEST))
|
|
|
|
UNIT_TEST_RESULTS = $(addprefix $(TRICK_HOME)/trick_test/, $(addsuffix .xml, $(COMPILE_DIRS)))
|
|
|
|
|
|
|
|
test: $(EXECUTABLES) $(UNIT_TEST_RESULTS) data_record_results
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(UNIT_TEST_RESULTS)
|
|
|
|
- for i in $(COMPILE_DIRS) ; do \
|
2017-08-04 20:05:52 +00:00
|
|
|
if [ -f "$$i/"[Mm]"akefile" ] ; then \
|
|
|
|
$(MAKE) -C $$i spotless ; \
|
|
|
|
fi \
|
|
|
|
done
|
|
|
|
|
|
|
|
- for i in $(SIMS_NEEDING_TEST) ; do \
|
|
|
|
if [ -f "$$i/"[Mm]"akefile" ] ; then \
|
|
|
|
$(MAKE) -C $$i spotless ; \
|
|
|
|
fi \
|
|
|
|
done
|
2016-02-24 14:52:25 +00:00
|
|
|
|
|
|
|
$(EXECUTABLES):
|
|
|
|
@ cd $(@D) ; ${TRICK_HOME}/bin/trick-CP -t
|
|
|
|
|
|
|
|
$(UNIT_TEST_RESULTS): $(TRICK_HOME)/trick_test/%.xml : %/T_main_${TRICK_HOST_CPU}_test.exe
|
|
|
|
@ cd $* ; ./T_main_${TRICK_HOST_CPU}_test.exe RUN_test/unit_test.py
|
|
|
|
|
|
|
|
DR_RESULTS = $(TRICK_HOME)/test/SIM_test_dr/RUN_test
|
2017-03-29 14:05:55 +00:00
|
|
|
data_record_results: $(TRICK_HOME)/trick_test/SIM_test_dr.xml $(DR_RESULTS)
|
2016-02-24 14:52:25 +00:00
|
|
|
diff $(DR_RESULTS)/log_DR_bitfieldsASCII.csv $(DR_RESULTS)/Ref_Logs/log_DR_bitfieldsASCII_Master.csv
|
|
|
|
diff $(DR_RESULTS)/log_DR_typesASCII.csv $(DR_RESULTS)/Ref_Logs/log_DR_typesASCII_Master.csv
|
2017-04-18 13:01:50 +00:00
|
|
|
cmp -b $(DR_RESULTS)/log_DR_bitfieldsBINARY.trk $(DR_RESULTS)/Ref_Logs/log_DR_bitfieldsBINARY.trk
|
|
|
|
cmp -b $(DR_RESULTS)/log_DR_typesBINARY.trk $(DR_RESULTS)/Ref_Logs/log_DR_typesBINARY.trk
|
2016-02-24 14:52:25 +00:00
|
|
|
|