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)
|
2020-02-14 16:23:20 +00:00
|
|
|
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
|
2016-02-24 14:52:25 +00:00
|
|
|
|
2021-05-17 16:08:04 +00:00
|
|
|
# Remove when issue #1147 is fixed: https://github.com/nasa/trick/issues/1147
|
|
|
|
unexport TRICK_PYTHON_PATH
|
|
|
|
|
2019-12-11 19:43:01 +00:00
|
|
|
SIMS_TO_COMPILE_ONLY = \
|
2017-08-04 20:05:52 +00:00
|
|
|
SIM_alloc_test \
|
2022-04-28 17:22:21 +00:00
|
|
|
SIM_anon_enum \
|
2019-12-11 19:43:01 +00:00
|
|
|
SIM_default_member_initializer \
|
2021-02-06 01:32:36 +00:00
|
|
|
SIM_delete_default_constructor \
|
2017-08-04 20:05:52 +00:00
|
|
|
SIM_demo_inputfile \
|
2019-10-04 18:49:36 +00:00
|
|
|
SIM_exclusion_mechanisms \
|
2019-06-20 15:12:33 +00:00
|
|
|
SIM_isystem \
|
2017-08-04 20:05:52 +00:00
|
|
|
SIM_measurement_units \
|
2019-05-08 13:41:50 +00:00
|
|
|
SIM_parse_s_define \
|
2019-06-20 15:12:33 +00:00
|
|
|
SIM_target_specific_variables \
|
2017-08-04 20:05:52 +00:00
|
|
|
SIM_test_abstract \
|
|
|
|
SIM_test_inherit \
|
|
|
|
SIM_test_ip2 \
|
|
|
|
SIM_threads_simple \
|
|
|
|
SIM_trickcomm
|
2016-02-24 14:52:25 +00:00
|
|
|
|
2019-12-11 19:43:01 +00:00
|
|
|
SIMS_TO_COMPILE_AND_RUN = \
|
|
|
|
SIM_demo_sdefine \
|
|
|
|
SIM_events \
|
2022-10-28 22:19:54 +00:00
|
|
|
SIM_exec_set_time_tic_value \
|
2019-12-11 19:43:01 +00:00
|
|
|
SIM_python_namespace \
|
|
|
|
SIM_rti \
|
|
|
|
SIM_stls \
|
|
|
|
SIM_test_dp \
|
|
|
|
SIM_test_dr \
|
2021-04-20 00:34:17 +00:00
|
|
|
SIM_test_icg_file_skipped \
|
2019-12-11 19:43:01 +00:00
|
|
|
SIM_test_io \
|
|
|
|
SIM_test_ip \
|
|
|
|
SIM_test_sched \
|
|
|
|
SIM_test_templates \
|
2021-05-17 16:08:04 +00:00
|
|
|
SIM_threads \
|
2022-08-24 18:34:03 +00:00
|
|
|
SIM_trickified
|
2019-12-11 19:43:01 +00:00
|
|
|
|
2022-10-07 13:37:09 +00:00
|
|
|
# SIM_stls will run twice. First run is RUN_test/setup.py, which is added as a dependency to test in its S_overrides.mk file
|
|
|
|
# The second run is the normal RUN_test/unit_test.py which is run through this makefile.
|
|
|
|
|
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_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
|
|
|
|
|
2019-12-11 19:43:01 +00:00
|
|
|
EXECUTABLES = $(addsuffix /T_main_${TRICK_HOST_CPU}_test.exe, $(SIMS_TO_COMPILE_AND_RUN) $(SIMS_TO_COMPILE_ONLY))
|
|
|
|
UNIT_TEST_RESULTS = $(addprefix $(TRICK_HOME)/trick_test/, $(addsuffix .xml, $(SIMS_TO_COMPILE_AND_RUN)))
|
2016-02-24 14:52:25 +00:00
|
|
|
|
|
|
|
test: $(EXECUTABLES) $(UNIT_TEST_RESULTS) data_record_results
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(UNIT_TEST_RESULTS)
|
2019-12-11 19:43:01 +00:00
|
|
|
- for i in $(SIMS_TO_COMPILE_AND_RUN) ; do \
|
2017-08-04 20:05:52 +00:00
|
|
|
if [ -f "$$i/"[Mm]"akefile" ] ; then \
|
|
|
|
$(MAKE) -C $$i spotless ; \
|
|
|
|
fi \
|
|
|
|
done
|
|
|
|
|
2019-12-11 19:43:01 +00:00
|
|
|
- for i in $(SIMS_TO_COMPILE_ONLY) ; do \
|
2017-08-04 20:05:52 +00:00
|
|
|
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
|
2020-02-14 16:23:20 +00:00
|
|
|
ifeq (${TRICK_FORCE_32BIT}, 1)
|
|
|
|
cmp -b $(DR_RESULTS)/log_DR_typesBINARY.trk $(DR_RESULTS)/Ref_Logs/log_DR_typesBINARY_32.trk
|
|
|
|
else
|
2017-04-18 13:01:50 +00:00
|
|
|
cmp -b $(DR_RESULTS)/log_DR_typesBINARY.trk $(DR_RESULTS)/Ref_Logs/log_DR_typesBINARY.trk
|
2020-02-14 16:23:20 +00:00
|
|
|
endif
|