From 6271283c313ac11701f71d2c5deddfa254cb4443 Mon Sep 17 00:00:00 2001 From: Alex Lin Date: Fri, 20 Oct 2017 15:03:31 -0500 Subject: [PATCH] Revert Trick::Clock::clock_spin shouldn't call RELEASE() #489 Added a stub exec_get_rt_nap function in the test directory that always returns false. That is the cleanest way to satisfy the call for the unit tests. --- trick_source/sim_services/Clock/test/Makefile | 8 +++++--- .../sim_services/Clock/test/exec_get_rt_nap_stub.cpp | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 trick_source/sim_services/Clock/test/exec_get_rt_nap_stub.cpp diff --git a/trick_source/sim_services/Clock/test/Makefile b/trick_source/sim_services/Clock/test/Makefile index b702876a..c1dc76a4 100644 --- a/trick_source/sim_services/Clock/test/Makefile +++ b/trick_source/sim_services/Clock/test/Makefile @@ -20,11 +20,11 @@ endif BASE_OBJECTS = ../object_${TRICK_HOST_CPU}/Clock.o\ ../object_${TRICK_HOST_CPU}/clock_c_intf.o -BC635_CLOCK_OBJECTS = ${BASE_OBJECTS} BC635Clock_test.o ../object_${TRICK_HOST_CPU}/BC635Clock.o +BC635_CLOCK_OBJECTS = ${BASE_OBJECTS} BC635Clock_test.o ../object_${TRICK_HOST_CPU}/BC635Clock.o exec_get_rt_nap_stub.o -GETTIMEOFDAY_CLOCK_OBJECTS = ${BASE_OBJECTS} GetTimeOfDayClock_test.o ../object_${TRICK_HOST_CPU}/GetTimeOfDayClock.o +GETTIMEOFDAY_CLOCK_OBJECTS = ${BASE_OBJECTS} GetTimeOfDayClock_test.o ../object_${TRICK_HOST_CPU}/GetTimeOfDayClock.o exec_get_rt_nap_stub.o -TPROCTE_CLOCK_OBJECTS = ${BASE_OBJECTS} TPROCTEClock_test.o ../object_${TRICK_HOST_CPU}/TPROCTEClock.o +TPROCTE_CLOCK_OBJECTS = ${BASE_OBJECTS} TPROCTEClock_test.o ../object_${TRICK_HOST_CPU}/TPROCTEClock.o exec_get_rt_nap_stub.o # All tests produced by this Makefile. Remember to add new tests you @@ -62,3 +62,5 @@ BC635Clock_test.o : BC635Clock_test.cpp BC635Clock_test : ${BC635_CLOCK_OBJECTS} $(TRICK_CPPC) $(TRICK_SYSTEM_LDFLAGS) -o $@ $^ ${LIBS} +exec_get_rt_nap_stub.o : exec_get_rt_nap_stub.cpp + $(TRICK_CPPC) $(TRICK_CPPFLAGS) -c $< diff --git a/trick_source/sim_services/Clock/test/exec_get_rt_nap_stub.cpp b/trick_source/sim_services/Clock/test/exec_get_rt_nap_stub.cpp new file mode 100644 index 00000000..7701f467 --- /dev/null +++ b/trick_source/sim_services/Clock/test/exec_get_rt_nap_stub.cpp @@ -0,0 +1,4 @@ + +extern "C" int exec_get_rt_nap() { + return 0 ; +}