From d3acfa5fc06711f2db851be30387f6cdd1aeeae2 Mon Sep 17 00:00:00 2001 From: Alex Lin Date: Mon, 22 Jun 2015 16:11:08 -0500 Subject: [PATCH] Test code does not work with new directory locations. Adjusted all of the source code to point to the header files in their new locations. Adjusted the makefiles for the header locations as well. Added .gitignore files in the test directories to ignore test object code. --- .gitignore | 1 + libexec/trick/pm/s_source.pm | 4 + trick_sims/.gitignore | 1 + trick_sims/SIM_Ball++_L1/RUN_test/input.py | 18 ++-- trick_sims/SIM_trickcomm/.gitignore | 4 + trick_sims/makefile | 4 +- .../DPX/test/unit_test/.gitignore | 4 + .../DPX/test/unit_test/DPC_test.cpp | 28 +++---- .../DPX/test/unit_test/DPM_test.cpp | 16 ++-- .../DPX/test/unit_test/DS_test.cpp | 16 ++-- .../data_products/DPX/test/unit_test/makefile | 6 +- .../sim_services/Clock/test/.gitignore | 3 + .../Clock/test/BC635Clock_test.cpp | 22 ++--- .../sim_services/Clock/test/Clocks_test.cpp | 12 +-- .../Clock/test/GetTimeOfDayClock_test.cpp | 20 ++--- trick_source/sim_services/Clock/test/Makefile | 10 +-- .../Clock/test/TPROCTEClock_test.cpp | 22 ++--- .../sim_services/Executive/test/.gitignore | 2 + .../Executive/test/Executive_test.cpp | 82 +++++++++--------- .../sim_services/Executive/test/Makefile | 10 +-- .../sim_services/Integrator/test/.gitignore | 2 + .../Integrator/test/Integrator_unittest.cc | 42 +++++----- .../sim_services/Integrator/test/Makefile | 30 +++---- .../MemoryManager/test/.gitignore | 20 +++++ .../MemoryManager/test/Bitfield_tests.cpp | 20 ++--- .../test/MM_creation_unittest.cc | 2 +- .../test/MM_delete_var_unittest.cc | 2 +- .../MemoryManager/test/MM_get_enumerated.cc | 2 +- .../MemoryManager/test/MM_read_checkpoint.cc | 2 +- .../test/MM_resize_array_unittest.cc | 2 +- .../MemoryManager/test/MM_strdup_unittest.cc | 2 +- .../MemoryManager/test/MM_test.hh | 2 +- .../test/MM_write_var_unittest.cc | 2 +- .../sim_services/MemoryManager/test/Makefile | 30 +++---- .../sim_services/MonteCarlo/test/.gitignore | 3 + .../sim_services/MonteCarlo/test/Makefile | 14 ++-- .../MonteCarlo/test/MonteCarlo_exceptions.cpp | 20 ++--- .../MonteCarlo/test/MonteCarlo_test.cpp | 84 +++++++++---------- .../ScheduledJobQueue/test/.gitignore | 2 + .../ScheduledJobQueue/test/Makefile | 10 +-- .../test/ScheduledJobQueue_test.cpp | 24 +++--- .../sim_services/Timer/test/.gitignore | 2 + .../sim_services/Timer/test/ITimer_test.cpp | 22 ++--- trick_source/sim_services/Timer/test/Makefile | 10 +-- trick_source/sim_services/mains/master.cpp | 2 +- trick_source/trick_utils/comm/test/.gitignore | 1 + trick_source/trick_utils/comm/test/Makefile | 10 +-- .../trick_utils/comm/test/TCBlockioTest.cpp | 12 +-- .../trick_utils/comm/test/TCConnectTest.cpp | 12 +-- .../trick_utils/comm/test/TCDevCopyTest.cpp | 12 +-- .../comm/test/TCDisconnectTest.cpp | 12 +-- .../trick_utils/comm/test/TCErrorTest.cpp | 12 +-- .../trick_utils/comm/test/TCIsValidTest.cpp | 12 +-- .../trick_utils/comm/test/TCPendingTest.cpp | 12 +-- .../comm/test/TCReadByteSwapTest.cpp | 12 +-- .../comm/test/TCSetBlockIOTest.cpp | 12 +-- .../trick_utils/interpolator/test/.gitignore | 2 + .../test/Interpolator_unittest.cc | 12 +-- .../trick_utils/interpolator/test/Makefile | 6 +- .../trick_utils/units/test/.gitignore | 3 + .../units/test/UnitConvTestSuite.cpp | 2 +- .../trick_utils/units/test/UnitTestSuite.cpp | 28 ++++--- trick_source/trick_utils/units/test/makefile | 6 +- 63 files changed, 435 insertions(+), 381 deletions(-) create mode 100644 trick_sims/SIM_trickcomm/.gitignore create mode 100644 trick_source/data_products/DPX/test/unit_test/.gitignore create mode 100644 trick_source/sim_services/Clock/test/.gitignore create mode 100644 trick_source/sim_services/Executive/test/.gitignore create mode 100644 trick_source/sim_services/Integrator/test/.gitignore create mode 100644 trick_source/sim_services/MemoryManager/test/.gitignore create mode 100644 trick_source/sim_services/MonteCarlo/test/.gitignore create mode 100644 trick_source/sim_services/ScheduledJobQueue/test/.gitignore create mode 100644 trick_source/sim_services/Timer/test/.gitignore create mode 100644 trick_source/trick_utils/comm/test/.gitignore create mode 100644 trick_source/trick_utils/interpolator/test/.gitignore create mode 100644 trick_source/trick_utils/units/test/.gitignore diff --git a/.gitignore b/.gitignore index 94e79753..dfb8f327 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ bin/trick-trk2ascii bin/trick-trk2csv aclocal.m4 autom4te.cache +trick_test diff --git a/libexec/trick/pm/s_source.pm b/libexec/trick/pm/s_source.pm index d44d70bd..47c8cd65 100644 --- a/libexec/trick/pm/s_source.pm +++ b/libexec/trick/pm/s_source.pm @@ -310,6 +310,10 @@ PURPOSE: print S_SOURCE " " x 4, "return ;\n" , "}\n\n" ; + print S_SOURCE "int master( int nargs, char ** args ) ;\n\n" ; + print S_SOURCE "int main( int nargs, char ** args ) {\n" ; + print S_SOURCE " " x 4 , "return master(nargs, args) ;\n" ; + print S_SOURCE "}\n" ; close S_SOURCE ; diff --git a/trick_sims/.gitignore b/trick_sims/.gitignore index 61f60d81..49806ed4 100644 --- a/trick_sims/.gitignore +++ b/trick_sims/.gitignore @@ -20,5 +20,6 @@ S_main_* S_sie.resource S_source.cpp S_source.hh +T_main_* trick jitlib diff --git a/trick_sims/SIM_Ball++_L1/RUN_test/input.py b/trick_sims/SIM_Ball++_L1/RUN_test/input.py index a809eb29..a2433617 100644 --- a/trick_sims/SIM_Ball++_L1/RUN_test/input.py +++ b/trick_sims/SIM_Ball++_L1/RUN_test/input.py @@ -4,15 +4,15 @@ import trick def main(): # Data recording HDF5 test - #drg0 = trick.DRAscii("Ball") - #for param in [ 'position' , 'velocity' , 'acceleration' , 'external_force' ] : - # for index in range(0,2) : - # var = "ball.obj.state.output." + param + "[" + str(index) + "]" - # drg0.add_variable(var) - #drg0.set_cycle(0.01) - #drg0.freq = trick.DR_Always - #drg0.thisown = 0 - #trick.add_data_record_group(drg0, trick.DR_Buffer) + drg0 = trick.DRAscii("Ball") + for param in [ 'position' , 'velocity' , 'acceleration' , 'external_force' ] : + for index in range(0,2) : + var = "ball.obj.state.output." + param + "[" + str(index) + "]" + drg0.add_variable(var) + drg0.set_cycle(0.01) + drg0.freq = trick.DR_Always + drg0.thisown = 0 + trick.add_data_record_group(drg0, trick.DR_Buffer) my_integ_loop.getIntegrator( trick.Runge_Kutta_2, 4 ); diff --git a/trick_sims/SIM_trickcomm/.gitignore b/trick_sims/SIM_trickcomm/.gitignore new file mode 100644 index 00000000..eff10ebc --- /dev/null +++ b/trick_sims/SIM_trickcomm/.gitignore @@ -0,0 +1,4 @@ +tc_client +tc_client.dSYM +tc_server +tc_server.dSYM diff --git a/trick_sims/makefile b/trick_sims/makefile index dadc6129..631bf8ef 100644 --- a/trick_sims/makefile +++ b/trick_sims/makefile @@ -1,5 +1,5 @@ -export TRICK_HOST_CPU := $(shell $(TRICK_HOME)/bin/gte TRICK_HOST_CPU) +export TRICK_HOST_CPU := $(shell $(TRICK_HOME)/bin/trick-gte TRICK_HOST_CPU) # List out sims we want to compile COMPILE_DIRS = SIM_Ball++_L1 \ @@ -98,7 +98,7 @@ clean: done $(EXECUTABLES): - @ cd $(@D) ; ${TRICK_HOME}/bin/CP -t ; + @ 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 diff --git a/trick_source/data_products/DPX/test/unit_test/.gitignore b/trick_source/data_products/DPX/test/unit_test/.gitignore new file mode 100644 index 00000000..bb6e1d85 --- /dev/null +++ b/trick_source/data_products/DPX/test/unit_test/.gitignore @@ -0,0 +1,4 @@ +*.o +DPC_test +DPM_test +DS_test diff --git a/trick_source/data_products/DPX/test/unit_test/DPC_test.cpp b/trick_source/data_products/DPX/test/unit_test/DPC_test.cpp index d6308bee..b5bd0182 100644 --- a/trick_source/data_products/DPX/test/unit_test/DPC_test.cpp +++ b/trick_source/data_products/DPX/test/unit_test/DPC_test.cpp @@ -10,13 +10,13 @@ #include "test_view.hh" #include "gtest/gtest.h" -#include "trick_utils/reqs/include/RequirementScribe.hh" +//#include "trick_utils/reqs/include/RequirementScribe.hh" namespace Trick { class DPCTest : public ::testing::Test { protected: - Trick::RequirementScribe req; + //Trick::RequirementScribe req; std::string testxml[15]; DPCTest() {} @@ -158,7 +158,7 @@ TEST_F(DPCTest, ValidateDTD) { // Session 1_1 TEST_F(DPCTest, VarvsTime_Binary) { - req.add_requirement("2416241399 3201880761"); + //req.add_requirement("2416241399 3201880761"); std::string tmp = parseDPCData(testxml[0].c_str()); //std::cout << tmp; @@ -195,7 +195,7 @@ TEST_F(DPCTest, VarvsTime_Binary) { // Session 1_2 TEST_F(DPCTest, VarvsTime_CSV) { - req.add_requirement("2416241399 32631267"); + //req.add_requirement("2416241399 32631267"); std::string tmp = parseDPCData(testxml[1].c_str()); //std::cout << tmp; @@ -257,7 +257,7 @@ TEST_F(DPCTest, SinglePlot) { // Session 3_1 TEST_F(DPCTest, SingleTable) { - req.add_requirement("3667219994"); + //req.add_requirement("3667219994"); std::string tmp = parseDPCData(testxml[3].c_str()); //std::cout << tmp; @@ -322,7 +322,7 @@ TEST_F(DPCTest, PlotAttr_Binary) { * DPV currently only supports 2D plots. */ TEST_F(DPCTest, 3DProduct_2DPlot) { - req.add_requirement("2469402355"); + //req.add_requirement("2469402355"); std::string tmp = parseDPCData(testxml[5].c_str()); //std::cout << tmp << std::endl; @@ -398,7 +398,7 @@ TEST_F(DPCTest, Table_Attributes) { // Session 7_1 TEST_F(DPCTest, MultiplePlots) { - req.add_requirement("445237094"); + //req.add_requirement("445237094"); std::string tmp = parseDPCData(testxml[7].c_str()); int result = strcmp_IgnoringWhiteSpace( @@ -460,7 +460,7 @@ TEST_F(DPCTest, MultiplePlots) { // Session 8_1 TEST_F(DPCTest, MultPlots_MultTables) { - req.add_requirement("150267139 32631267"); + //req.add_requirement("150267139 32631267"); std::string tmp = parseDPCData(testxml[8].c_str()); //std::cout << tmp << std::endl; @@ -557,7 +557,7 @@ TEST_F(DPCTest, MultPlots_MultTables) { // Session_8_2 TEST_F(DPCTest, MultTables) { - req.add_requirement("2064022342 3201880761"); + //req.add_requirement("2064022342 3201880761"); std::string tmp = parseDPCData(testxml[9].c_str()); //std::cout << tmp; @@ -616,7 +616,7 @@ TEST_F(DPCTest, MultTables) { // Session 9_1 TEST_F(DPCTest, ComparisonCurves) { - req.add_requirement("665188150"); + //req.add_requirement("665188150"); std::string tmp = parseDPCData(testxml[10].c_str()); //std::cout << tmp; @@ -687,7 +687,7 @@ TEST_F(DPCTest, ComparisonCurves) { // Session 9_2 TEST_F(DPCTest, DeltaCurves) { - req.add_requirement("2904854297"); + //req.add_requirement("2904854297"); std::string tmp = parseDPCData(testxml[11].c_str()); //std::cout << tmp; @@ -737,7 +737,7 @@ TEST_F(DPCTest, DeltaCurves) { // Session 9_3 TEST_F(DPCTest, ContrastCurves) { - req.add_requirement("3042036071"); + //req.add_requirement("3042036071"); std::string tmp = parseDPCData(testxml[12].c_str()); //std::cout << tmp; @@ -844,7 +844,7 @@ TEST_F(DPCTest, ContrastCurves) { } TEST_F(DPCTest, DPV_Test) { - req.add_requirement("2826924382 1366633954"); + //req.add_requirement("2826924382 1366633954"); std::string tmp = parseDPCData(testxml[13].c_str()); //std::cout << tmp; @@ -907,7 +907,7 @@ TEST_F(DPCTest, DPV_Test) { } TEST_F(DPCTest, Plot_Matlab) { - req.add_requirement("2533684432"); + //req.add_requirement("2533684432"); std::string tmp = parseDPCData("../TEST_DATA/session_mat.xml"); //std::cout << tmp; diff --git a/trick_source/data_products/DPX/test/unit_test/DPM_test.cpp b/trick_source/data_products/DPX/test/unit_test/DPM_test.cpp index 4c44f081..959e6fea 100644 --- a/trick_source/data_products/DPX/test/unit_test/DPM_test.cpp +++ b/trick_source/data_products/DPX/test/unit_test/DPM_test.cpp @@ -8,14 +8,14 @@ #include #include "gtest/gtest.h" -#include "trick_utils/reqs/include/RequirementScribe.hh" +//#include "trick_utils/reqs/include/RequirementScribe.hh" #include "DPM/DPM_product.hh" namespace Trick { class DPMTest : public ::testing::Test { protected: - Trick::RequirementScribe req; + //Trick::RequirementScribe req; std::string testxml[10]; DPMTest() {} @@ -130,7 +130,7 @@ TEST_F(DPMTest, ValidateDTD) { // Product 1 TEST_F(DPMTest, VarvsTime_NoAttributes) { - req.add_requirement("2416241399"); + //req.add_requirement("2416241399"); std::string tmp = parseTestData(testxml[0].c_str()); int result = strcmp_IgnoringWhiteSpace( @@ -165,7 +165,7 @@ TEST_F(DPMTest, VarvsTime_NoAttributes) { // Product 2 TEST_F(DPMTest, VarvsVar_NoAttributes) { - req.add_requirement("1589175037"); + //req.add_requirement("1589175037"); std::string tmp = parseTestData(testxml[1].c_str()); int result = strcmp_IgnoringWhiteSpace( @@ -253,7 +253,7 @@ TEST_F(DPMTest, VarvsTime_Attributes) { // Product 5 TEST_F(DPMTest, VarvsVarvsTime_Attributes) { - req.add_requirement("2469402355"); + //req.add_requirement("2469402355"); std::string tmp = parseTestData(testxml[4].c_str()); int result = strcmp_IgnoringWhiteSpace( @@ -340,7 +340,7 @@ TEST_F(DPMTest, Table_Attributes) { // Product 7 TEST_F(DPMTest, MultiplePlots) { - req.add_requirement("445237094"); + //req.add_requirement("445237094"); std::string tmp = parseTestData(testxml[6].c_str()); int result = strcmp_IgnoringWhiteSpace( @@ -402,7 +402,7 @@ TEST_F(DPMTest, MultiplePlots) { // Product 8 TEST_F(DPMTest, MultipleTables_Multipe_Plots) { - req.add_requirement("1422666851 150267139 445237094"); + //req.add_requirement("1422666851 150267139 445237094"); std::string tmp = parseTestData(testxml[7].c_str()); int result = strcmp_IgnoringWhiteSpace( @@ -470,7 +470,7 @@ TEST_F(DPMTest, MultipleTables_Multipe_Plots) { // Product 9 TEST_F(DPMTest, Multipe_Plots_NoAttributes) { - req.add_requirement("445237094"); + //req.add_requirement("445237094"); std::string tmp = parseTestData(testxml[8].c_str()); int result = strcmp_IgnoringWhiteSpace( diff --git a/trick_source/data_products/DPX/test/unit_test/DS_test.cpp b/trick_source/data_products/DPX/test/unit_test/DS_test.cpp index 8233f07d..ddb70f5a 100644 --- a/trick_source/data_products/DPX/test/unit_test/DS_test.cpp +++ b/trick_source/data_products/DPX/test/unit_test/DS_test.cpp @@ -9,7 +9,7 @@ #include "DPM/DPM_time_constraints.hh" #include "gtest/gtest.h" -#include "trick_utils/reqs/include/RequirementScribe.hh" +//#include "trick_utils/reqs/include/RequirementScribe.hh" namespace Trick { @@ -34,7 +34,7 @@ int strcmp_IgnoreWhiteSpace(const char* s1, const char* s2) { class DSTest : public :: testing::Test { protected: - Trick::RequirementScribe req; + //Trick::RequirementScribe req; std::string testxml[14]; DSTest() {} @@ -122,7 +122,7 @@ std::string DSTest::run(char ch) { // ASCII (CSV) DATASTREAM TEST_F(DSTest, DataStream_Ascii) { - req.add_requirement("32631267"); + //req.add_requirement("32631267"); RUN_dir = "../TEST_DATA/RUN_ASCII"; VarName = "sun_predictor.sun.solar_azimuth"; @@ -193,7 +193,7 @@ TEST_F(DSTest, DataStream_Ascii) { // TRICK BINARY DATASTREAM TEST_F(DSTest, DataStream_Binary) { - req.add_requirement("3201880761"); + //req.add_requirement("3201880761"); RUN_dir = "../TEST_DATA/RUN_BINARY"; VarName = "sun_predictor.sun.solar_elevation"; @@ -264,7 +264,7 @@ TEST_F(DSTest, DataStream_Binary) { // MATLAB DATASTREAM TEST_F(DSTest, DataStream_MatLab) { - req.add_requirement("2533684432 1366633954"); + //req.add_requirement("2533684432 1366633954"); RUN_dir = "../TEST_DATA/RUN_MATLAB"; VarName = "ch_joint_angle_5"; @@ -337,7 +337,7 @@ TEST_F(DSTest, DataStream_MatLab) { // The delta statement is formatted as follows: // delta(, ) TEST_F(DSTest, DataStream_Delta) { - req.add_requirement("2904854297"); + //req.add_requirement("2904854297"); RUN_dir = NULL; char DeltaName[1000]; @@ -355,7 +355,7 @@ TEST_F(DSTest, DataStream_Delta) { // DPC UNIT CONVERSION DATASTREAM TEST_F(DSTest, DataStream_DPCUnitConv) { - req.add_requirement("2269871888"); + //req.add_requirement("2269871888"); RUN_dir = "../TEST_DATA/RUN_BINARY"; VarName = "sun_predictor.sun.right_ascension"; @@ -383,7 +383,7 @@ TEST_F(DSTest, DataStream_DPCUnitConv) { // TIME CONSTRAINT DATASTREAM TEST_F(DSTest, DataStream_DPCTimeCstr) { - req.add_requirement("3610816325"); + //req.add_requirement("3610816325"); int i; DPM_time_constraints *time_constraints; diff --git a/trick_source/data_products/DPX/test/unit_test/makefile b/trick_source/data_products/DPX/test/unit_test/makefile index cb1b7f27..70fd2077 100644 --- a/trick_source/data_products/DPX/test/unit_test/makefile +++ b/trick_source/data_products/DPX/test/unit_test/makefile @@ -1,5 +1,5 @@ -include ${TRICK_HOME}/makefiles/Makefile.common +include ${TRICK_HOME}/share/trick/makefiles/Makefile.common ifneq ($(HDF5),) ifneq ($(HDF5),/usr) @@ -47,8 +47,8 @@ else endif GTEST_LIBS = ${GTEST_HOME}/lib/libgtest.a ${GTEST_HOME}/lib/libgtest_main.a -TRICK_UNIT_LIBS = -L${TRICK_HOME}/lib_${TRICK_HOST_CPU} -ltrick_units -DP_LIBS = -L${TRICK_HOME}/lib_${TRICK_HOST_CPU} \ +TRICK_UNIT_LIBS = -L${TRICK_LIB_DIR} -ltrick_units +DP_LIBS = -L${TRICK_LIB_DIR} \ -L${TRICK_HOME}/trick_source/data_products/lib_${TRICK_HOST_CPU} \ -llog -lvar -leqparse MODEL_LIBS = -lxml2 \ diff --git a/trick_source/sim_services/Clock/test/.gitignore b/trick_source/sim_services/Clock/test/.gitignore new file mode 100644 index 00000000..8ed8bd85 --- /dev/null +++ b/trick_source/sim_services/Clock/test/.gitignore @@ -0,0 +1,3 @@ +*.o +BC635Clock_test +TPROCTEClock_test diff --git a/trick_source/sim_services/Clock/test/BC635Clock_test.cpp b/trick_source/sim_services/Clock/test/BC635Clock_test.cpp index d33face9..491c2815 100644 --- a/trick_source/sim_services/Clock/test/BC635Clock_test.cpp +++ b/trick_source/sim_services/Clock/test/BC635Clock_test.cpp @@ -14,13 +14,13 @@ #include #include "gtest/gtest.h" -#include "sim_services/Clock/include/Clock.hh" -#include "sim_services/Clock/include/clock_proto.h" -#include "sim_services/Clock/include/GetTimeOfDayClock.hh" -#include "sim_services/Clock/include/TPROCTEClock.hh" -#include "sim_services/Clock/include/BC635Clock.hh" -#include "sim_services/SimObject/include/JobData.hh" -#include "trick_utils/reqs/include/RequirementScribe.hh" +#include "trick/Clock.hh" +#include "trick/clock_proto.h" +#include "trick/GetTimeOfDayClock.hh" +#include "trick/TPROCTEClock.hh" +#include "trick/BC635Clock.hh" +#include "trick/JobData.hh" +//#include "trick/RequirementScribe.hh" namespace Trick { @@ -34,7 +34,7 @@ class BC635ClockTest : public ::testing::Test { virtual void SetUp() {} virtual void TearDown() {} - Trick::RequirementScribe req; + //Trick::RequirementScribe req; } ; //std::map< std::string , unsigned int > Trick::Requirements::num_reqs; @@ -42,7 +42,7 @@ class BC635ClockTest : public ::testing::Test { /* Ensure clock initializes correctly */ TEST_F(BC635ClockTest, Initialize) { - req.add_requirement("BC635_clock"); + //req.add_requirement("BC635_clock"); // "The BC635 clock shall initialize reference time of 0, and all ratios set to 1."); /* General expected clock initialization */ @@ -58,7 +58,7 @@ TEST_F(BC635ClockTest, Initialize) { /* Run tests for when no hardware is available */ #ifndef _BC635 TEST_F(BC635ClockTest, ErrorMessages) { - req.add_requirement("BC635_clock"); + //req.add_requirement("BC635_clock"); //"The BC635 clock shall display error messages when attempting to use its functions with no hardware."); /* curr_time = 0 always */ @@ -80,7 +80,7 @@ TEST_F(BC635ClockTest, ErrorMessages) { /* Ensure generic clock functions still work when no hardware is available */ TEST_F(BC635ClockTest, TestRefTimes) { - req.add_requirement("BC635_clock"); + //req.add_requirement("BC635_clock"); //"The BC635 clock shall provide the ability to adjust the reference time"); long long secs_remainder; diff --git a/trick_source/sim_services/Clock/test/Clocks_test.cpp b/trick_source/sim_services/Clock/test/Clocks_test.cpp index 2385a236..86cef9c9 100644 --- a/trick_source/sim_services/Clock/test/Clocks_test.cpp +++ b/trick_source/sim_services/Clock/test/Clocks_test.cpp @@ -3,12 +3,12 @@ #include #include "gtest/gtest.h" -#include "sim_services/Clock/include/Clock.hh" -#include "sim_services/Clock/include/clock_proto.h" -#include "sim_services/Clock/include/GetTimeOfDayClock.hh" -#include "sim_services/Clock/include/TPROCTEClock.hh" -#include "sim_services/Clock/include/BC635Clock.hh" -#include "sim_services/SimObject/include/JobData.hh" +#include "trick/Clock.hh" +#include "trick/clock_proto.h" +#include "trick/GetTimeOfDayClock.hh" +#include "trick/TPROCTEClock.hh" +#include "trick/BC635Clock.hh" +#include "trick/JobData.hh" namespace Trick { diff --git a/trick_source/sim_services/Clock/test/GetTimeOfDayClock_test.cpp b/trick_source/sim_services/Clock/test/GetTimeOfDayClock_test.cpp index 3d5e5e35..35851bbd 100644 --- a/trick_source/sim_services/Clock/test/GetTimeOfDayClock_test.cpp +++ b/trick_source/sim_services/Clock/test/GetTimeOfDayClock_test.cpp @@ -8,9 +8,9 @@ #include #include "gtest/gtest.h" -#include "sim_services/Clock/include/GetTimeOfDayClock.hh" -#include "sim_services/SimObject/include/JobData.hh" -#include "trick_utils/reqs/include/RequirementScribe.hh" +#include "trick/GetTimeOfDayClock.hh" +#include "trick/JobData.hh" +//#include "trick/RequirementScribe.hh" #define TIME_TOL 1e3 #define RATIO_TOL 1e-9 @@ -22,7 +22,7 @@ class GetTimeOfDayClockTest : public ::testing::Test { protected: Trick::GetTimeOfDayClock dClk; - Trick::RequirementScribe req; + //Trick::RequirementScribe req; GetTimeOfDayClockTest() {} ~GetTimeOfDayClockTest() {} @@ -32,7 +32,7 @@ class GetTimeOfDayClockTest : public ::testing::Test { /* Ensure clock initializes correctly */ TEST_F(GetTimeOfDayClockTest, Initialize) { - req.add_requirement("timeofday_clock"); + //req.add_requirement("timeofday_clock"); //"The system clock shall initialize with time equal to computer system time, reference time of 0, and all ratios set to 1."); struct timeval res; @@ -54,7 +54,7 @@ TEST_F(GetTimeOfDayClockTest, Initialize) { } TEST_F(GetTimeOfDayClockTest, ClockSimRatio) { - req.add_requirement("timeofday_clock"); + //req.add_requirement("timeofday_clock"); //"The system clock shall provide the ability to change the sim time-to-real time ratio."); long long tim_curr; @@ -75,7 +75,7 @@ TEST_F(GetTimeOfDayClockTest, ClockSimRatio) { } TEST_F(GetTimeOfDayClockTest, ClockRTRatio) { - req.add_requirement("timeofday_clock"); + //req.add_requirement("timeofday_clock"); //"The system clock shall provide the ability to adjust the reference time ratio."); long long tim_curr, tim_diff; @@ -104,7 +104,7 @@ TEST_F(GetTimeOfDayClockTest, ClockRTRatio) { } TEST_F(GetTimeOfDayClockTest, ClockSpin) { - req.add_requirement("timeofday_clock"); + //req.add_requirement("timeofday_clock"); //"The system clock shall provide the ability to spin (wait) until a specified time is reached."); long long tim_curr, spin_time; @@ -122,7 +122,7 @@ TEST_F(GetTimeOfDayClockTest, ClockSpin) { /* Change and test reference times */ TEST_F(GetTimeOfDayClockTest, ReferenceTime) { - req.add_requirement("timeofday_clock"); + //req.add_requirement("timeofday_clock"); //"The system clock shall provide the ability to set a reference time."); long long tic_adjust; @@ -143,7 +143,7 @@ TEST_F(GetTimeOfDayClockTest, ReferenceTime) { } TEST_F(GetTimeOfDayClockTest, ClockSync) { - req.add_requirement("timeofday_clock"); + //req.add_requirement("timeofday_clock"); //"The system clock shall provide the ability to sync reference time to wall clock time"); double align_tics_mult; diff --git a/trick_source/sim_services/Clock/test/Makefile b/trick_source/sim_services/Clock/test/Makefile index bf6f3dce..f03b1925 100644 --- a/trick_source/sim_services/Clock/test/Makefile +++ b/trick_source/sim_services/Clock/test/Makefile @@ -5,20 +5,20 @@ # make TARGET - makes the given target. # make clean - removes all files generated by make. -include ${TRICK_HOME}/makefiles/Makefile.common +include ${TRICK_HOME}/share/trick/makefiles/Makefile.common # Flags passed to the preprocessor. -TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/trick_source -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 +TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 -TRICK_LIBS = ${TRICK_HOME}/lib_${TRICK_HOST_CPU}/libtrick.a +TRICK_LIBS = ${TRICK_LIB_DIR}/libtrick.a TRICK_EXEC_LINK_LIBS += ${GTEST_HOME}/lib/libgtest.a ${GTEST_HOME}/lib/libgtest_main.a # All tests produced by this Makefile. Remember to add new tests you # created to the list. TESTS = TPROCTEClock_test BC635Clock_test -OTHER_OBJECTS = ../../SimObject/object_${TRICK_HOST_CPU}/io_JobData.o \ - ../../SimObject/object_${TRICK_HOST_CPU}/io_SimObject.o +OTHER_OBJECTS = ../../include/object_${TRICK_HOST_CPU}/io_JobData.o \ + ../../include/object_${TRICK_HOST_CPU}/io_SimObject.o # House-keeping build targets. diff --git a/trick_source/sim_services/Clock/test/TPROCTEClock_test.cpp b/trick_source/sim_services/Clock/test/TPROCTEClock_test.cpp index 0514b724..b53d22b8 100644 --- a/trick_source/sim_services/Clock/test/TPROCTEClock_test.cpp +++ b/trick_source/sim_services/Clock/test/TPROCTEClock_test.cpp @@ -17,13 +17,13 @@ #include "gtest/gtest.h" -#include "sim_services/Clock/include/Clock.hh" -#include "sim_services/Clock/include/clock_proto.h" -#include "sim_services/Clock/include/GetTimeOfDayClock.hh" -#include "sim_services/Clock/include/TPROCTEClock.hh" -#include "sim_services/Clock/include/BC635Clock.hh" -#include "sim_services/SimObject/include/JobData.hh" -#include "trick_utils/reqs/include/RequirementScribe.hh" +#include "trick/Clock.hh" +#include "trick/clock_proto.h" +#include "trick/GetTimeOfDayClock.hh" +#include "trick/TPROCTEClock.hh" +#include "trick/BC635Clock.hh" +#include "trick/JobData.hh" +//#include "trick/RequirementScribe.hh" namespace Trick { @@ -37,14 +37,14 @@ class TPROCTEClockTest : public ::testing::Test { virtual void SetUp() {} virtual void TearDown() {} - Trick::RequirementScribe req; + //Trick::RequirementScribe req; } ; //std::map< std::string , unsigned int > TPROCTEClockTest::num_reqs; /* Ensure clock initializes correctly */ TEST_F(TPROCTEClockTest, Initialize) { - req.add_requirement("TPROCTE_clock"); + //req.add_requirement("TPROCTE_clock"); //"The TPROCTE clock shall initialize reference time of 0, and all ratios set to 1."); /* General expected clock initialization */ @@ -60,7 +60,7 @@ TEST_F(TPROCTEClockTest, Initialize) { /* Run tests for when no hardware is available */ #ifndef _TPRO_CTE TEST_F(TPROCTEClockTest, NoHardware) { - req.add_requirement("TPROCTE_clock"); + //req.add_requirement("TPROCTE_clock"); //"The TPROCTE clock shall display error messages when attempting to use its functions with no hardware"); long long req_time = rand(); @@ -83,7 +83,7 @@ TEST_F(TPROCTEClockTest, NoHardware) { /* Ensure generic clock functions work properly */ TEST_F(TPROCTEClockTest, TestRefTimes) { - req.add_requirement("TPROCTE_clock"); + //req.add_requirement("TPROCTE_clock"); //"The TPROCTE clock shall provide the ability to adjust the reference time"); long long secs_remainder; diff --git a/trick_source/sim_services/Executive/test/.gitignore b/trick_source/sim_services/Executive/test/.gitignore new file mode 100644 index 00000000..c0eac510 --- /dev/null +++ b/trick_source/sim_services/Executive/test/.gitignore @@ -0,0 +1,2 @@ +*.o +Executive_test diff --git a/trick_source/sim_services/Executive/test/Executive_test.cpp b/trick_source/sim_services/Executive/test/Executive_test.cpp index 017ac98a..be551e6c 100644 --- a/trick_source/sim_services/Executive/test/Executive_test.cpp +++ b/trick_source/sim_services/Executive/test/Executive_test.cpp @@ -5,17 +5,15 @@ #include "gtest/gtest.h" #define protected public -#include "sim_services/Executive/include/Exec_exception.hh" -#include "sim_services/Executive/include/Executive.hh" -#include "sim_services/Executive/include/exec_proto.h" -#include "sim_services/Executive/include/exec_proto.hh" -#include "sim_services/Message/include/MessagePublisher.hh" -#include "sim_services/Message/include/MessageCout.hh" -#include "sim_services/SimObject/include/SimObject.hh" -#include "sim_services/MemoryManager/include/MemoryManager.hh" -#include "sim_services/MemoryManager/include/memorymanager_c_intf.h" -#include "trick_utils/reqs/include/RequirementScribe.hh" - +#include "trick/ExecutiveException.hh" +#include "trick/Executive.hh" +#include "trick/exec_proto.h" +#include "trick/exec_proto.hh" +#include "trick/MessagePublisher.hh" +#include "trick/MessageCout.hh" +#include "trick/SimObject.hh" +#include "trick/MemoryManager.hh" +#include "trick/memorymanager_c_intf.h" void sig_hand(int sig) ; void ctrl_c_hand(int sig) ; @@ -227,7 +225,7 @@ class ExecutiveTest : public ::testing::Test { Trick::MessagePublisher mpublisher ; Trick::MessageCout mcout ; Trick::MemoryManager mm ; - Trick::RequirementScribe req; + //Trick::RequirementScribe req; ExecutiveTest() {} @@ -281,13 +279,13 @@ void ExecutiveTest::SetUp() { /* JOB TESTS */ TEST_F(ExecutiveTest , AddSimObject) { - req.add_requirement( "r_exec_jobs"); + //req.add_requirement( "r_exec_jobs"); //"The Executive Scheduler shall provide a method for adding simulation objects to the scheduler" exec_add_sim_object(&so1 , "so1") ; } TEST_F(ExecutiveTest , AddJobsToQueue) { - req.add_requirement( "r_exec_jobs"); + //req.add_requirement( "r_exec_jobs"); //"The Executive Scheduler shall sort jobs with executive job classes in ScheduledJobQueues" exec_add_sim_object(&so1 , "so1") ; @@ -322,7 +320,7 @@ TEST_F(ExecutiveTest , AddJobsToQueue) { } TEST_F(ExecutiveTest , JobQueueNonScheduledIDs) { - req.add_requirement("r_exec_jobs"); + //req.add_requirement("r_exec_jobs"); //"The Executive Scheduler shall assign job class id of the following classes < 1000, default_data , input_processor , initialization , top_of_frame , end_of_frame , shutdown , freeze_init , freeze_scheduled , freeze_automatic, freeze , unfreeze, and exec_time_tic_changed" EXPECT_LT( get_class_map_value("default_data") , 1000 ) ; EXPECT_LT( get_class_map_value("input_processor") , 1000 ) ; @@ -339,20 +337,20 @@ TEST_F(ExecutiveTest , JobQueueNonScheduledIDs) { } TEST_F(ExecutiveTest , AddScheduledJobClass) { - req.add_requirement("1630595230"); + //req.add_requirement("1630595230"); //"The Executive Scheduler shall provide a method for adding scheduled job class names" // some names were added in the SetUp method EXPECT_EQ( get_class_map_value("automatic") , 1000 ) ; } TEST_F(ExecutiveTest , JobQueueStartIndex) { - req.add_requirement("r_exec_jobs"); + //req.add_requirement("r_exec_jobs"); //"The Executive Scheduler shall assign the first scheduled job class id = 1000" EXPECT_EQ( get_class_map_value("automatic") , 1000 ) ; } TEST_F(ExecutiveTest , JobQueueNameOrder) { - req.add_requirement("r_exec_jobs"); + //req.add_requirement("r_exec_jobs"); //"The Executive Scheduler shall increment the job class id for each additional scheduled job class" EXPECT_EQ( get_class_map_value("automatic") , 1000 ) ; @@ -365,7 +363,7 @@ TEST_F(ExecutiveTest , JobQueueNameOrder) { // Job class ordering is tested in ScheduledJobQueue. TEST_F(ExecutiveTest , AddDepends) { - req.add_requirement("r_exec_jobs"); + //req.add_requirement("r_exec_jobs"); //"The Executive Scheduler shall provide the capability to add dependency jobs to scheduled jobs" Trick::JobData * curr_job ; @@ -391,7 +389,7 @@ TEST_F(ExecutiveTest , AddDepends) { } TEST_F(ExecutiveTest , UnhandledJobs) { - req.add_requirement("r_exec_jobs"); + //req.add_requirement("r_exec_jobs"); //"The Executive Scheduler shall provide the capability to list jobs not handled by any scheduler." Trick::JobData * curr_job ; @@ -401,7 +399,7 @@ TEST_F(ExecutiveTest , UnhandledJobs) { } TEST_F(ExecutiveTest , JobCycleNotDivisibleByTimeTic) { - req.add_requirement("r_exec_jobs"); + //req.add_requirement("r_exec_jobs"); //"The Executive Scheduler shall provide the capability to list jobs not handled by any scheduler." EXPECT_EQ(exec_get_time_tic_value(), 1000000) ; @@ -412,7 +410,7 @@ TEST_F(ExecutiveTest , JobCycleNotDivisibleByTimeTic) { /* INITIALIZATION */ TEST_F(ExecutiveTest , GoodInitialization) { - req.add_requirement("2605574440") ; + //req.add_requirement("2605574440") ; exec_add_sim_object(&so1 , "so1") ; @@ -434,7 +432,7 @@ TEST_F(ExecutiveTest , GoodInitialization) { } TEST_F(ExecutiveTest , ErrorDefaultData) { - req.add_requirement("773089468") ; + //req.add_requirement("773089468") ; so1.add_job(0, 101, "default_data", NULL, 1, "return_error", "TRK") ; exec_add_sim_object(&so1 , "so1") ; @@ -455,7 +453,7 @@ TEST_F(ExecutiveTest , ErrorDefaultData) { } TEST_F(ExecutiveTest , ErrorInputProcessor) { - req.add_requirement("773089468") ; + //req.add_requirement("773089468") ; so1.add_job(0, 101, "input_processor", NULL, 1, "return_error", "TRK") ; exec_add_sim_object(&so1 , "so1") ; @@ -476,7 +474,7 @@ TEST_F(ExecutiveTest , ErrorInputProcessor) { } TEST_F(ExecutiveTest , ErrorInitialization) { - req.add_requirement("773089468") ; + //req.add_requirement("773089468") ; so1.add_job(0, 101, "initialization", NULL, 1, "return_error", "TRK") ; exec_add_sim_object(&so1 , "so1") ; @@ -497,7 +495,7 @@ TEST_F(ExecutiveTest , ErrorInitialization) { } TEST_F(ExecutiveTest , ExeceptionDefaultData) { - req.add_requirement("773089468") ; + //req.add_requirement("773089468") ; so1.add_job(0, 102, "default_data", NULL, 1, "throw_exception", "TRK") ; exec_add_sim_object(&so1 , "so1") ; EXPECT_EQ(exec.init() , -1 ) ; @@ -517,7 +515,7 @@ TEST_F(ExecutiveTest , ExeceptionDefaultData) { } TEST_F(ExecutiveTest , ExeceptionInputProcessor) { - req.add_requirement("773089468") ; + //req.add_requirement("773089468") ; so1.add_job(0, 102, "input_processor", NULL, 1, "throw_exception", "TRK") ; exec_add_sim_object(&so1 , "so1") ; EXPECT_EQ(exec.init() , -1 ) ; @@ -537,7 +535,7 @@ TEST_F(ExecutiveTest , ExeceptionInputProcessor) { } TEST_F(ExecutiveTest , ExeceptionInitialization) { - req.add_requirement("2605574440") ; + //req.add_requirement("2605574440") ; so1.add_job(0, 102, "initialization", NULL, 1, "throw_exception", "TRK") ; exec_add_sim_object(&so1 , "so1") ; EXPECT_EQ(exec.init() , -1 ) ; @@ -559,20 +557,20 @@ TEST_F(ExecutiveTest , ExeceptionInitialization) { /* TIME TESTS */ TEST_F(ExecutiveTest , IntegerTime) { - req.add_requirement("2618149062"); + //req.add_requirement("2618149062"); //"The Executive Scheduler shall track simulation elapsed time by an integer count of tics/second") ; EXPECT_EQ(exec_get_time_tics(), 0) ; } TEST_F(ExecutiveTest , DefaultTimeTicValue) { - req.add_requirement("2436759852"); + //req.add_requirement("2436759852"); // "The Executive Scheduler shall default to 1,000,000 tics/second") ; EXPECT_EQ(exec_get_time_tic_value(), 1000000) ; } TEST_F(ExecutiveTest , AdvanceSimTimeToNextJob) { - req.add_requirement("2449626778"); + //req.add_requirement("2449626778"); //"The Executive Scheduler shall advance simulation time to the time of the next lowest job call time if the next lowest job call time is less than the next software frame boundary ") ; Trick::Threads * curr_thread ; Trick::JobData * curr_job ; @@ -595,7 +593,7 @@ TEST_F(ExecutiveTest , AdvanceSimTimeToNextJob) { TEST_F(ExecutiveTest , AdvanceSimTimeToBoundary) { - req.add_requirement("4140012270"); + //req.add_requirement("4140012270"); // "The Executive Scheduler shall advance simulation time to the time of the next software boundary if the next lowest job call time is greater than or equal to the next software frame boundary ") ; Trick::Threads * curr_thread ; @@ -615,7 +613,7 @@ TEST_F(ExecutiveTest , AdvanceSimTimeToBoundary) { TEST_F(ExecutiveTest , Checkpoint) { - req.add_requirement("2678139818 1653083281"); + //req.add_requirement("2678139818 1653083281"); //"The Executive Scheduler shall copy all job information to a checkpointable array before a checkpoint is executed") ; unsigned int ii = 0 ; @@ -696,7 +694,7 @@ TEST_F(ExecutiveTest , Checkpoint) { } TEST_F(ExecutiveTest , ClearScheduledQueues) { - req.add_requirement(""); + //req.add_requirement(""); exec_add_sim_object(&so1 , "so1") ; @@ -723,7 +721,7 @@ TEST_F(ExecutiveTest , ClearScheduledQueues) { } TEST_F(ExecutiveTest , Moding) { - req.add_requirement("411993330 2253353824 2874482372"); + //req.add_requirement("411993330 2253353824 2874482372"); exec.freeze() ; exec.async_freeze_to_exec_command() ; @@ -737,7 +735,7 @@ TEST_F(ExecutiveTest , Moding) { } TEST_F(ExecutiveTest , GetJob) { - req.add_requirement(""); + //req.add_requirement(""); Trick::JobData * curr_job ; @@ -763,7 +761,7 @@ TEST_F(ExecutiveTest , GetJob) { } TEST_F(ExecutiveTest , JobCycle) { - req.add_requirement(""); + //req.add_requirement(""); exec_add_sim_object(&so1 , "so1") ; EXPECT_NEAR( exec.get_job_cycle(std::string("so1.scheduled_3")) , 3.0 , 0.000001) ; @@ -782,7 +780,7 @@ TEST_F(ExecutiveTest , JobCycle) { TEST_F(ExecutiveTest , SetSignalHandlers) { - req.add_requirement(""); + //req.add_requirement(""); static struct sigaction sigact; @@ -826,7 +824,7 @@ TEST_F(ExecutiveTest , SetSignalHandlers) { } TEST_F(ExecutiveTest , JobOnOff) { - req.add_requirement("2445198072"); + //req.add_requirement("2445198072"); Trick::JobData * curr_job ; @@ -844,7 +842,7 @@ TEST_F(ExecutiveTest , JobOnOff) { } TEST_F(ExecutiveTest , SimObjectOnOff) { - req.add_requirement("3132950280"); + //req.add_requirement("3132950280"); Trick::JobData * curr_job ; @@ -863,14 +861,14 @@ TEST_F(ExecutiveTest , SimObjectOnOff) { } TEST_F(ExecutiveTest , LockMemory) { - req.add_requirement("715042410"); + //req.add_requirement("715042410"); // Requires root to run. Will pass if run as root. //EXPECT_EQ(exec.set_lock_memory(true), 0) ; } TEST_F(ExecutiveTest , SetThreadParameters) { - req.add_requirement("3839914374"); + //req.add_requirement("3839914374"); so1.add_job(1, 100, "scheduled", NULL, 1, "child_job_1", "TRK") ; exec_add_sim_object(&so1 , "so1") ; diff --git a/trick_source/sim_services/Executive/test/Makefile b/trick_source/sim_services/Executive/test/Makefile index e3d465a0..37ac39cb 100644 --- a/trick_source/sim_services/Executive/test/Makefile +++ b/trick_source/sim_services/Executive/test/Makefile @@ -5,20 +5,20 @@ # make TARGET - makes the given target. # make clean - removes all files generated by make. -include ${TRICK_HOME}/makefiles/Makefile.common +include ${TRICK_HOME}/share/trick/makefiles/Makefile.common # Flags passed to the preprocessor. -TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/trick_source -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 +TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 -TRICK_LIBS = ${TRICK_HOME}/lib_${TRICK_HOST_CPU}/libtrick.a +TRICK_LIBS = ${TRICK_LIB_DIR}/libtrick.a TRICK_EXEC_LINK_LIBS += ${GTEST_HOME}/lib/libgtest.a ${GTEST_HOME}/lib/libgtest_main.a # All tests produced by this Makefile. Remember to add new tests you # created to the list. TESTS = Executive_test -OTHER_OBJECTS = ../../SimObject/object_${TRICK_HOST_CPU}/io_JobData.o \ - ../../SimObject/object_${TRICK_HOST_CPU}/io_SimObject.o +OTHER_OBJECTS = ../../include/object_${TRICK_HOST_CPU}/io_JobData.o \ + ../../include/object_${TRICK_HOST_CPU}/io_SimObject.o # House-keeping build targets. diff --git a/trick_source/sim_services/Integrator/test/.gitignore b/trick_source/sim_services/Integrator/test/.gitignore new file mode 100644 index 00000000..626aae79 --- /dev/null +++ b/trick_source/sim_services/Integrator/test/.gitignore @@ -0,0 +1,2 @@ +*.o +Integrator_unittest diff --git a/trick_source/sim_services/Integrator/test/Integrator_unittest.cc b/trick_source/sim_services/Integrator/test/Integrator_unittest.cc index fa910535..5308db08 100644 --- a/trick_source/sim_services/Integrator/test/Integrator_unittest.cc +++ b/trick_source/sim_services/Integrator/test/Integrator_unittest.cc @@ -4,14 +4,14 @@ // We need access to protected stuff for unit tests! #define protected public -#include "sim_services/MemoryManager/include/MemoryManager.hh" -#include "sim_services/Integrator/include/Integrator.hh" -#include "sim_services/Integrator/include/IntegLoopScheduler.hh" -#include "sim_services/Executive/include/Executive.hh" -#include "sim_services/Executive/include/exec_proto.h" -#include "sim_services/Executive/include/exec_proto.hh" -#include "sim_services/SimObject/include/SimObject.hh" -#include "trick_utils/reqs/include/RequirementScribe.hh" +#include "trick/MemoryManager.hh" +#include "trick/Integrator.hh" +#include "trick/IntegLoopScheduler.hh" +#include "trick/Executive.hh" +#include "trick/exec_proto.h" +#include "trick/exec_proto.hh" +#include "trick/SimObject.hh" +//#include "trick/RequirementScribe.hh" #include #include @@ -90,7 +90,7 @@ double testSimObject::call_function_double( Trick::JobData* curr_job) { class IntegratorTest : public ::testing::Test { protected: Trick::MemoryManager *memmgr; - Trick::RequirementScribe req; + //Trick::RequirementScribe req; IntegratorTest() { memmgr = new Trick::MemoryManager;} ~IntegratorTest() { delete memmgr; } virtual void SetUp() {} @@ -104,7 +104,7 @@ class IntegratorLoopTest : public ::testing::Test { Trick::IntegLoopScheduler* IntegLoop ; testSimObject uno; Trick::MemoryManager *memmgr; - Trick::RequirementScribe req; + //Trick::RequirementScribe req; IntegratorLoopTest() { memmgr = new Trick::MemoryManager; IntegLoop = new Trick::IntegLoopScheduler(0.01, &uno) ;} ~IntegratorLoopTest() { delete memmgr; delete IntegLoop; } virtual void SetUp() {} @@ -119,7 +119,7 @@ class IntegratorLoopTest : public ::testing::Test { TEST_F(IntegratorLoopTest, Job_Queue_Init) { - req.add_requirement(""); + //req.add_requirement(""); Trick::JobData* curr_job; exec_add_sim_object(&uno, "uno"); @@ -241,7 +241,7 @@ void verify_ball_sim_results(BALL *ball, TEST_F(IntegratorTest, Ball_Euler) { - req.add_requirement("2402458648"); + //req.add_requirement("2402458648"); Trick::Integrator *integrator = Trick::getIntegrator( Euler, 4, 0.01); ASSERT_TRUE( (void*)integrator != NULL); @@ -268,7 +268,7 @@ TEST_F(IntegratorTest, Ball_Euler) { TEST_F(IntegratorTest, Ball_Euler_Cromer) { - req.add_requirement("215930604"); + //req.add_requirement("215930604"); Trick::Euler_Cromer_Integrator *integrator = (Trick::Euler_Cromer_Integrator *) Trick::getIntegrator( Euler_Cromer, 4, 0.01); @@ -324,7 +324,7 @@ TEST_F(IntegratorTest, Ball_Nystrom_Lear_2) { TEST_F(IntegratorTest, Ball_Runge_Kutta_2) { - req.add_requirement("2472195139"); + //req.add_requirement("2472195139"); Trick::Integrator *integrator = Trick::getIntegrator( Runge_Kutta_2, 4, 0.01); ASSERT_TRUE( (void*)integrator != NULL); @@ -351,7 +351,7 @@ TEST_F(IntegratorTest, Ball_Runge_Kutta_2) { TEST_F(IntegratorTest, Ball_Modified_Midpoint_4) { - req.add_requirement("2825965576"); + //req.add_requirement("2825965576"); Trick::Integrator *integrator = Trick::getIntegrator( Modified_Midpoint_4, 4, 0.01); ASSERT_TRUE( (void*)integrator != NULL); @@ -378,7 +378,7 @@ TEST_F(IntegratorTest, Ball_Modified_Midpoint_4) { TEST_F(IntegratorTest, Ball_Runge_Kutta_4) { - req.add_requirement("2472195141"); + //req.add_requirement("2472195141"); Trick::Integrator *integrator = Trick::getIntegrator( Runge_Kutta_4, 4, 0.01); ASSERT_TRUE( (void*)integrator != NULL); @@ -405,7 +405,7 @@ TEST_F(IntegratorTest, Ball_Runge_Kutta_4) { TEST_F(IntegratorTest, Ball_Runge_Kutta_Gill_4) { - req.add_requirement("3039955373"); + //req.add_requirement("3039955373"); Trick::Integrator *integrator = Trick::getIntegrator( Runge_Kutta_Gill_4, 4, 0.01); ASSERT_TRUE( (void*)integrator != NULL); @@ -432,7 +432,7 @@ TEST_F(IntegratorTest, Ball_Runge_Kutta_Gill_4) { TEST_F(IntegratorTest, Ball_Runge_Kutta_Fehlberg_45) { - req.add_requirement("674248205"); + //req.add_requirement("674248205"); Trick::Integrator *integrator = Trick::getIntegrator( Runge_Kutta_Fehlberg_45, 4, 0.01); ASSERT_TRUE( (void*)integrator != NULL); @@ -459,7 +459,7 @@ TEST_F(IntegratorTest, Ball_Runge_Kutta_Fehlberg_45) { TEST_F(IntegratorTest, Ball_Runge_Kutta_Fehlberg_78) { - req.add_requirement("674248511"); + //req.add_requirement("674248511"); Trick::Integrator *integrator = Trick::getIntegrator( Runge_Kutta_Fehlberg_78, 4, 0.01); ASSERT_TRUE( (void*)integrator != NULL); @@ -487,7 +487,7 @@ TEST_F(IntegratorTest, Ball_Runge_Kutta_Fehlberg_78) { #if 0 TEST_F(IntegratorTest, Ball_ABM) { - req.add_requirement("3643754476"); + //req.add_requirement("3643754476"); Trick::Integrator *integrator = Trick::getIntegrator( ABM_Method, 4, 0.01); ASSERT_TRUE( (void*)integrator != NULL); @@ -532,7 +532,7 @@ namespace Trick { TEST_F(IntegratorTest, Ball_UserDefined) { - req.add_requirement("3491920037"); + //req.add_requirement("3491920037"); Trick::Donna_Integrator *integrator = INTEG_NEW(Trick::Donna_Integrator); integrator = new (integrator) Trick::Donna_Integrator(0, 0.1); diff --git a/trick_source/sim_services/Integrator/test/Makefile b/trick_source/sim_services/Integrator/test/Makefile index da48d315..ad279849 100644 --- a/trick_source/sim_services/Integrator/test/Makefile +++ b/trick_source/sim_services/Integrator/test/Makefile @@ -5,12 +5,12 @@ # make TARGET - makes the given target. # make clean - removes all files generated by make. -include ${TRICK_HOME}/makefiles/Makefile.common +include ${TRICK_HOME}/share/trick/makefiles/Makefile.common # Flags passed to the preprocessor. -TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/trick_source -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 -DUSE_ER7_UTILS_INTEGRATORS=1 +TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -I${TRICK_HOME}/trick_source -I${TRICK_HOME}/include/trick/compat -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 -DUSE_ER7_UTILS_INTEGRATORS=1 -TRICK_LIBS = ${TRICK_HOME}/lib_${TRICK_HOST_CPU}/libtrick.a +TRICK_LIBS = ${TRICK_LIB_DIR}/libtrick.a TRICK_EXEC_LINK_LIBS += ${GTEST_HOME}/lib/libgtest.a ${GTEST_HOME}/lib/libgtest_main.a # All tests produced by this Makefile. Remember to add new tests you @@ -18,17 +18,17 @@ TRICK_EXEC_LINK_LIBS += ${GTEST_HOME}/lib/libgtest.a ${GTEST_HOME}/lib/libgtest_ TESTS = Integrator_unittest OTHER_OBJECTS = \ -${TRICK_HOME}/trick_source/sim_services/Integrator/er7_algorithms/object_${TRICK_HOST_CPU}/io_ABM_Integrator.o \ -${TRICK_HOME}/trick_source/sim_services/Integrator/er7_algorithms/object_${TRICK_HOST_CPU}/io_Euler_Cromer_Integrator.o \ -${TRICK_HOME}/trick_source/sim_services/Integrator/er7_algorithms/object_${TRICK_HOST_CPU}/io_Euler_Integrator.o \ -${TRICK_HOME}/trick_source/sim_services/Integrator/object_${TRICK_HOST_CPU}/io_Integrator.o \ -${TRICK_HOME}/trick_source/sim_services/Integrator/er7_algorithms/object_${TRICK_HOST_CPU}/io_MM4_Integrator.o \ -${TRICK_HOME}/trick_source/sim_services/Integrator/er7_algorithms/object_${TRICK_HOST_CPU}/io_NL2_Integrator.o \ -${TRICK_HOME}/trick_source/sim_services/Integrator/er7_algorithms/object_${TRICK_HOST_CPU}/io_RK2_Integrator.o \ -${TRICK_HOME}/trick_source/sim_services/Integrator/er7_algorithms/object_${TRICK_HOST_CPU}/io_RK4_Integrator.o \ -${TRICK_HOME}/trick_source/sim_services/Integrator/er7_algorithms/object_${TRICK_HOST_CPU}/io_RKF45_Integrator.o \ -${TRICK_HOME}/trick_source/sim_services/Integrator/er7_algorithms/object_${TRICK_HOST_CPU}/io_RKF78_Integrator.o \ -${TRICK_HOME}/trick_source/sim_services/Integrator/er7_algorithms/object_${TRICK_HOST_CPU}/io_RKG4_Integrator.o + ../../include/object_${TRICK_HOST_CPU}/io_ABM_Integrator.o \ + ../../include/object_${TRICK_HOST_CPU}/io_Euler_Cromer_Integrator.o \ + ../../include/object_${TRICK_HOST_CPU}/io_Euler_Integrator.o \ + ../../include/object_${TRICK_HOST_CPU}/io_Integrator.o \ + ../../include/object_${TRICK_HOST_CPU}/io_MM4_Integrator.o \ + ../../include/object_${TRICK_HOST_CPU}/io_NL2_Integrator.o \ + ../../include/object_${TRICK_HOST_CPU}/io_RK2_Integrator.o \ + ../../include/object_${TRICK_HOST_CPU}/io_RK4_Integrator.o \ + ../../include/object_${TRICK_HOST_CPU}/io_RKF45_Integrator.o \ + ../../include/object_${TRICK_HOST_CPU}/io_RKF78_Integrator.o \ + ../../include/object_${TRICK_HOST_CPU}/io_RKG4_Integrator.o OTHER_OBJECTS += \ ${TRICK_HOME}/trick_source/er7_utils/integration/*/object_${TRICK_HOST_CPU}/*.o \ @@ -50,5 +50,5 @@ Integrator_unittest.o : Integrator_unittest.cc $(TRICK_CPPC) $(TRICK_CPPFLAGS) -c $< Integrator_unittest : Integrator_unittest.o - $(TRICK_LD) $(TRICK_LDFLAGS) -o $@ $^ $(OTHER_OBJECTS) -L${TRICK_HOME}/lib_${TRICK_HOST_CPU} $(TRICK_LIBS) $(TRICK_EXEC_LINK_LIBS) + $(TRICK_LD) $(TRICK_LDFLAGS) -o $@ $^ $(OTHER_OBJECTS) $(TRICK_LIBS) $(TRICK_EXEC_LINK_LIBS) diff --git a/trick_source/sim_services/MemoryManager/test/.gitignore b/trick_source/sim_services/MemoryManager/test/.gitignore new file mode 100644 index 00000000..0495036d --- /dev/null +++ b/trick_source/sim_services/MemoryManager/test/.gitignore @@ -0,0 +1,20 @@ +*.o +.icg_no_found +Bitfield_tests +MM_alloc_deps +MM_clear_var_unittest +MM_creation_unittest +MM_declare_extern_var_unittest +MM_declare_var_2_unittest +MM_declare_var_unittest +MM_delete_var_unittest +MM_get_enumerated +MM_read_checkpoint +MM_ref_attributes_unittest +MM_ref_name_from_address +MM_resize_array_unittest +MM_sizeof_type_unittest +MM_strdup_unittest +MM_write_checkpoint +MM_write_checkpoint_hexfloat +MM_write_var_unittest diff --git a/trick_source/sim_services/MemoryManager/test/Bitfield_tests.cpp b/trick_source/sim_services/MemoryManager/test/Bitfield_tests.cpp index b6b96745..f3e3271c 100644 --- a/trick_source/sim_services/MemoryManager/test/Bitfield_tests.cpp +++ b/trick_source/sim_services/MemoryManager/test/Bitfield_tests.cpp @@ -6,8 +6,8 @@ #include #include "gtest/gtest.h" -#include "sim_services/MemoryManager/include/bitfield_proto.h" -#include "trick_utils/reqs/include/RequirementScribe.hh" +#include "trick/bitfield_proto.h" +//#include "trick/RequirementScribe.hh" namespace Trick { @@ -65,7 +65,7 @@ typedef struct { class BitfieldsTest : public ::testing::Test { protected: - Trick::RequirementScribe req; + //Trick::RequirementScribe req; BitfieldsTest() {} ~BitfieldsTest() {} @@ -136,7 +136,7 @@ class BitfieldsTest : public ::testing::Test { TEST_F(BitfieldsTest, UnsignedInt) { - req.add_requirement("3119954850") ; + //req.add_requirement("3119954850") ; int bitSizes[4] = {14, 5, 12, 1}; @@ -144,7 +144,7 @@ TEST_F(BitfieldsTest, UnsignedInt) { } TEST_F(BitfieldsTest, UnsignedChar) { - req.add_requirement("3119954850") ; + //req.add_requirement("3119954850") ; int bitSizes[4] = {3, 2, 2, 1}; @@ -152,14 +152,14 @@ TEST_F(BitfieldsTest, UnsignedChar) { } TEST_F(BitfieldsTest, UnsignedShort) { - req.add_requirement("3119954850") ; + //req.add_requirement("3119954850") ; int bitSizes[4] = {4, 2, 9, 1}; bitTest (bitSizes, false); } TEST_F(BitfieldsTest, Int) { - req.add_requirement("1151502390"); + //req.add_requirement("1151502390"); int bitSizes[4] = {7, 16, 3, 6}; @@ -167,7 +167,7 @@ TEST_F(BitfieldsTest, Int) { } TEST_F(BitfieldsTest, Char) { - req.add_requirement("1151502390") ; + //req.add_requirement("1151502390") ; int bitSizes[4] = {2, 2, 2, 2}; @@ -175,7 +175,7 @@ TEST_F(BitfieldsTest, Char) { } TEST_F(BitfieldsTest, Short) { - req.add_requirement("1151502390") ; + //req.add_requirement("1151502390") ; int bitSizes[4] = {8, 1, 2, 5}; @@ -183,7 +183,7 @@ TEST_F(BitfieldsTest, Short) { } TEST_F(BitfieldsTest, Mix) { - req.add_requirement("1151502390") ; + //req.add_requirement("1151502390") ; int bitSizes[4] = {3, 8, 9, 12}; diff --git a/trick_source/sim_services/MemoryManager/test/MM_creation_unittest.cc b/trick_source/sim_services/MemoryManager/test/MM_creation_unittest.cc index 0b80d0cf..b3c0f82d 100644 --- a/trick_source/sim_services/MemoryManager/test/MM_creation_unittest.cc +++ b/trick_source/sim_services/MemoryManager/test/MM_creation_unittest.cc @@ -1,6 +1,6 @@ #include -#include "sim_services/MemoryManager/include/MemoryManager.hh" +#include "trick/MemoryManager.hh" TEST(MM_creation, NonNull) { diff --git a/trick_source/sim_services/MemoryManager/test/MM_delete_var_unittest.cc b/trick_source/sim_services/MemoryManager/test/MM_delete_var_unittest.cc index 7fab5724..e86833a7 100644 --- a/trick_source/sim_services/MemoryManager/test/MM_delete_var_unittest.cc +++ b/trick_source/sim_services/MemoryManager/test/MM_delete_var_unittest.cc @@ -1,6 +1,6 @@ #include -#include "sim_services/MemoryManager/include/MemoryManager.hh" +#include "trick/MemoryManager.hh" #include "MM_test.hh" #include diff --git a/trick_source/sim_services/MemoryManager/test/MM_get_enumerated.cc b/trick_source/sim_services/MemoryManager/test/MM_get_enumerated.cc index 2e35ebd5..d1a6175a 100644 --- a/trick_source/sim_services/MemoryManager/test/MM_get_enumerated.cc +++ b/trick_source/sim_services/MemoryManager/test/MM_get_enumerated.cc @@ -2,7 +2,7 @@ #include "gtest/gtest.h" #include "MM_test.hh" #include "MM_get_enumerated.hh" -#include "sim_services/MemoryManager/include/vval.h" +#include "trick/vval.h" // MM_sizeof_type diff --git a/trick_source/sim_services/MemoryManager/test/MM_read_checkpoint.cc b/trick_source/sim_services/MemoryManager/test/MM_read_checkpoint.cc index 53b88779..b37dc914 100644 --- a/trick_source/sim_services/MemoryManager/test/MM_read_checkpoint.cc +++ b/trick_source/sim_services/MemoryManager/test/MM_read_checkpoint.cc @@ -1,6 +1,6 @@ #include -#include "sim_services/MemoryManager/include/MemoryManager.hh" +#include "trick/MemoryManager.hh" #include "MM_user_defined_types.hh" #include "MM_test.hh" #include diff --git a/trick_source/sim_services/MemoryManager/test/MM_resize_array_unittest.cc b/trick_source/sim_services/MemoryManager/test/MM_resize_array_unittest.cc index 668058dd..06f635df 100644 --- a/trick_source/sim_services/MemoryManager/test/MM_resize_array_unittest.cc +++ b/trick_source/sim_services/MemoryManager/test/MM_resize_array_unittest.cc @@ -1,6 +1,6 @@ #include -#include "sim_services/MemoryManager/include/MemoryManager.hh" +#include "trick/MemoryManager.hh" #include "MM_user_defined_types.hh" #include "MM_test.hh" #include diff --git a/trick_source/sim_services/MemoryManager/test/MM_strdup_unittest.cc b/trick_source/sim_services/MemoryManager/test/MM_strdup_unittest.cc index 42c3b137..2fa739eb 100644 --- a/trick_source/sim_services/MemoryManager/test/MM_strdup_unittest.cc +++ b/trick_source/sim_services/MemoryManager/test/MM_strdup_unittest.cc @@ -1,6 +1,6 @@ #include -#include "sim_services/MemoryManager/include/MemoryManager.hh" +#include "trick/MemoryManager.hh" #include "MM_user_defined_types.hh" #include "MM_test.hh" #include diff --git a/trick_source/sim_services/MemoryManager/test/MM_test.hh b/trick_source/sim_services/MemoryManager/test/MM_test.hh index fbc1f245..7f8f5031 100644 --- a/trick_source/sim_services/MemoryManager/test/MM_test.hh +++ b/trick_source/sim_services/MemoryManager/test/MM_test.hh @@ -1,7 +1,7 @@ #ifndef MM_TEST_HH #define MM_TEST_HH -#include "sim_services/MemoryManager/include/MemoryManager.hh" +#include "trick/MemoryManager.hh" const char* ISO_6429_Restore_Default = "\x1b[00m"; const char* ISO_6429_Bold = "\x1b[01m"; diff --git a/trick_source/sim_services/MemoryManager/test/MM_write_var_unittest.cc b/trick_source/sim_services/MemoryManager/test/MM_write_var_unittest.cc index 36585c64..7e5bd843 100644 --- a/trick_source/sim_services/MemoryManager/test/MM_write_var_unittest.cc +++ b/trick_source/sim_services/MemoryManager/test/MM_write_var_unittest.cc @@ -1,6 +1,6 @@ #include -#include "sim_services/MemoryManager/include/MemoryManager.hh" +#include "trick/MemoryManager.hh" #include "MM_user_defined_types.hh" #include "MM_test.hh" #include diff --git a/trick_source/sim_services/MemoryManager/test/Makefile b/trick_source/sim_services/MemoryManager/test/Makefile index e0703b32..223c79c6 100644 --- a/trick_source/sim_services/MemoryManager/test/Makefile +++ b/trick_source/sim_services/MemoryManager/test/Makefile @@ -5,15 +5,15 @@ # make TARGET - makes the given target. # make clean - removes all files generated by make. -include ${TRICK_HOME}/makefiles/Makefile.common +include ${TRICK_HOME}/share/trick/makefiles/Makefile.common #COVERAGE_FLAGS += -fprofile-arcs -ftest-coverage -O0 #TRICK_LDFLAGS += ${COVERAGE_FLAGS} # Flags passed to the preprocessor. -TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/trick_source -g -Wall -Wextra ${COVERAGE_FLAGS} +TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra ${COVERAGE_FLAGS} -TRICK_LIBS = ${TRICK_HOME}/lib_${TRICK_HOST_CPU}/libtrick.a +TRICK_LIBS = ${TRICK_LIB_DIR}/libtrick.a TRICK_EXEC_LINK_LIBS += ${GTEST_HOME}/lib/libgtest.a ${GTEST_HOME}/lib/libgtest_main.a # All tests produced by this Makefile. Remember to add new tests you @@ -37,8 +37,8 @@ TESTS = MM_creation_unittest \ MM_ref_name_from_address \ Bitfield_tests -OTHER_OBJECTS = ../../SimObject/object_${TRICK_HOST_CPU}/io_JobData.o \ - ../../SimObject/object_${TRICK_HOST_CPU}/io_SimObject.o +OTHER_OBJECTS = ../../include/object_${TRICK_HOST_CPU}/io_JobData.o \ + ../../include/object_${TRICK_HOST_CPU}/io_SimObject.o # House-keeping build targets. @@ -91,24 +91,24 @@ clean : # Builds gtest.a and gtest_main.a. io_MM_user_defined_types.o : MM_user_defined_types.hh - ${TRICK_HOME}/bin/ICG -s $(TRICK_CPPFLAGS) $< - $(TRICK_CPPC) $(TRICK_CPPFLAGS) -c io_src/io_MM_user_defined_types.cpp + ${TRICK_HOME}/bin/trick-ICG -s $(TRICK_CPPFLAGS) $< + $(TRICK_CPPC) $(TRICK_CPPFLAGS) -c ../../include/io_src/io_MM_user_defined_types.cpp io_MM_alloc_deps.o : MM_alloc_deps.hh - ${TRICK_HOME}/bin/ICG -s $(TRICK_CPPFLAGS) $< - $(TRICK_CPPC) $(TRICK_CPPFLAGS) -c io_src/io_MM_alloc_deps.cpp + ${TRICK_HOME}/bin/trick-ICG -s $(TRICK_CPPFLAGS) $< + $(TRICK_CPPC) $(TRICK_CPPFLAGS) -c ../../include/io_src/io_MM_alloc_deps.cpp io_MM_write_checkpoint.o : MM_write_checkpoint.hh - ${TRICK_HOME}/bin/ICG -s $(TRICK_CPPFLAGS) $< - $(TRICK_CPPC) $(TRICK_CPPFLAGS) -c io_src/io_MM_write_checkpoint.cpp + ${TRICK_HOME}/bin/trick-ICG -s $(TRICK_CPPFLAGS) $< + $(TRICK_CPPC) $(TRICK_CPPFLAGS) -c ../../include/io_src/io_MM_write_checkpoint.cpp io_MM_get_enumerated.o : MM_get_enumerated.hh - ${TRICK_HOME}/bin/ICG -s $(TRICK_CPPFLAGS) $< - $(TRICK_CPPC) $(TRICK_CPPFLAGS) -c io_src/io_MM_get_enumerated.cpp + ${TRICK_HOME}/bin/trick-ICG -s $(TRICK_CPPFLAGS) $< + $(TRICK_CPPC) $(TRICK_CPPFLAGS) -c ../../include/io_src/io_MM_get_enumerated.cpp io_MM_ref_name_from_address.o : MM_ref_name_from_address.hh - ${TRICK_HOME}/bin/ICG -s $(TRICK_CPPFLAGS) $< - $(TRICK_CPPC) $(TRICK_CPPFLAGS) -c io_src/io_MM_ref_name_from_address.cpp + ${TRICK_HOME}/bin/trick-ICG -s $(TRICK_CPPFLAGS) $< + $(TRICK_CPPC) $(TRICK_CPPFLAGS) -c ../../include/io_src/io_MM_ref_name_from_address.cpp MM_creation_unittest.o : MM_creation_unittest.cc $(TRICK_CPPC) $(TRICK_CPPFLAGS) -c $< diff --git a/trick_source/sim_services/MonteCarlo/test/.gitignore b/trick_source/sim_services/MonteCarlo/test/.gitignore new file mode 100644 index 00000000..82c9a953 --- /dev/null +++ b/trick_source/sim_services/MonteCarlo/test/.gitignore @@ -0,0 +1,3 @@ +*.o +MonteCarlo_exceptions +MonteCarlo_test diff --git a/trick_source/sim_services/MonteCarlo/test/Makefile b/trick_source/sim_services/MonteCarlo/test/Makefile index 6144c770..0118229b 100644 --- a/trick_source/sim_services/MonteCarlo/test/Makefile +++ b/trick_source/sim_services/MonteCarlo/test/Makefile @@ -5,10 +5,10 @@ # make TARGET - makes the given target. # make clean - removes all files generated by make. -include ${TRICK_HOME}/makefiles/Makefile.common +include ${TRICK_HOME}/share/trick/makefiles/Makefile.common # Flags passed to the preprocessor. -TRICK_CXXFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/trick_source -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 +TRICK_CXXFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ifeq ($(HAVE_GSL),1) TRICK_CXXFLAGS += -D_HAVE_GSL ifneq ($(GSL_HOME),/usr) @@ -16,7 +16,7 @@ TRICK_CXXFLAGS += -I${GSL_HOME}/include endif endif -TRICK_LIBS = ${TRICK_HOME}/lib_${TRICK_HOST_CPU}/libtrick_pyip.a ${TRICK_HOME}/lib_${TRICK_HOST_CPU}/libtrick.a +TRICK_LIBS = ${TRICK_LIB_DIR}/libtrick_pyip.a ${TRICK_LIB_DIR}/libtrick.a TRICK_EXEC_LINK_LIBS += ${GTEST_HOME}/lib/libgtest.a ${GTEST_HOME}/lib/libgtest_main.a # All tests produced by this Makefile. Remember to add new tests you @@ -24,10 +24,10 @@ TRICK_EXEC_LINK_LIBS += ${GTEST_HOME}/lib/libgtest.a ${GTEST_HOME}/lib/libgtest_ TESTS = MonteCarlo_test MonteCarlo_exceptions -OTHER_OBJECTS = ../../SimObject/object_${TRICK_HOST_CPU}/io_JobData.o \ - ../../SimObject/object_${TRICK_HOST_CPU}/io_SimObject.o \ - ../object_${TRICK_HOST_CPU}/io_MonteCarlo.o \ - ../../include/object_${TRICK_HOST_CPU}/io_RemoteShell.o +OTHER_OBJECTS = ../../include/object_${TRICK_HOST_CPU}/io_JobData.o \ + ../../include/object_${TRICK_HOST_CPU}/io_SimObject.o \ + ../../include/object_${TRICK_HOST_CPU}/io_MonteCarlo.o \ + ../../include/object_${TRICK_HOST_CPU}/io_RemoteShell.o # House-keeping build targets. diff --git a/trick_source/sim_services/MonteCarlo/test/MonteCarlo_exceptions.cpp b/trick_source/sim_services/MonteCarlo/test/MonteCarlo_exceptions.cpp index 702a6c21..fdd7cc68 100644 --- a/trick_source/sim_services/MonteCarlo/test/MonteCarlo_exceptions.cpp +++ b/trick_source/sim_services/MonteCarlo/test/MonteCarlo_exceptions.cpp @@ -6,12 +6,12 @@ #include #include "gtest/gtest.h" -#include "sim_services/MonteCarlo/include/MonteCarlo.hh" -#include "sim_services/MonteCarlo/include/MonteVar.hh" -#include "sim_services/MonteCarlo/include/MonteVarFile.hh" -#include "sim_services/MonteCarlo/include/MonteVarRandom.hh" -#include "sim_services/SimObject/include/SimObject.hh" -#include "sim_services/Executive/include/Exec_exception.hh" +#include "trick/MonteCarlo.hh" +#include "trick/MonteVar.hh" +#include "trick/MonteVarFile.hh" +#include "trick/MonteVarRandom.hh" +#include "trick/SimObject.hh" +#include "trick/ExecutiveException.hh" void sig_hand(int sig) ; @@ -45,7 +45,7 @@ TEST_F(MonteCarloTest, MonteVarFile_ColException) { try { Trick::MonteVarFile var("time_to_fire_1", "M_jet_firings_inline", 7) ; var.get_next_value(); - } catch (Trick::Exec_exception &e) { + } catch (Trick::ExecutiveException &e) { std::cout << e.message << std::endl; got_exception = true; } @@ -58,7 +58,7 @@ TEST_F(MonteCarloTest, MonteVarFile_BadFileException) { try { Trick::MonteVarFile var("time_to_fire_1", "_M_jet_firings_inline", 1) ; var.get_next_value(); - } catch (Trick::Exec_exception &e) { + } catch (Trick::ExecutiveException &e) { std::cout << e.message << std::endl; got_exception = true; } @@ -74,7 +74,7 @@ TEST_F(MonteCarloTest, MonteVarFile_FileException) { var.input_file_stream->close(); var.get_next_value(); var.get_next_value(); - } catch (Trick::Exec_exception &e) { + } catch (Trick::ExecutiveException &e) { std::cout << e.message << std::endl; got_exception = true; } @@ -91,7 +91,7 @@ TEST_F(MonteCarloTest, TestMonteVarRandom_Exception) { var1.set_max(4.000001) ; exec.add_variable(&var1) ; var1.get_next_value(); - } catch (Trick::Exec_exception &e) { + } catch (Trick::ExecutiveException &e) { std::cout << e.message; got_exception = true; } diff --git a/trick_source/sim_services/MonteCarlo/test/MonteCarlo_test.cpp b/trick_source/sim_services/MonteCarlo/test/MonteCarlo_test.cpp index f6be5cd2..54749fee 100644 --- a/trick_source/sim_services/MonteCarlo/test/MonteCarlo_test.cpp +++ b/trick_source/sim_services/MonteCarlo/test/MonteCarlo_test.cpp @@ -9,22 +9,22 @@ #include #include "gtest/gtest.h" -#include "sim_services/Executive/include/Exec_exception.hh" -#include "sim_services/Executive/include/Executive.hh" -#include "sim_services/MonteCarlo/include/MonteCarlo.hh" -#include "sim_services/MonteCarlo/include/MonteVar.hh" -#include "sim_services/MonteCarlo/include/MonteVarCalculated.hh" -#include "sim_services/MonteCarlo/include/MonteVarFile.hh" -#include "sim_services/MonteCarlo/include/MonteVarFixed.hh" -#include "sim_services/MonteCarlo/include/MonteVarRandom.hh" -#include "sim_services/MonteCarlo/include/montecarlo_c_intf.h" -#include "sim_services/Executive/include/exec_proto.h" -#include "sim_services/Executive/include/exec_proto.hh" -#include "sim_services/SimObject/include/SimObject.hh" -#include "sim_services/MemoryManager/include/MemoryManager.hh" -#include "sim_services/MemoryManager/include/memorymanager_c_intf.h" -#include "trick_utils/math/include/rand_generator.h" -#include "trick_utils/reqs/include/RequirementScribe.hh" +#include "trick/ExecutiveException.hh" +#include "trick/Executive.hh" +#include "trick/MonteCarlo.hh" +#include "trick/MonteVar.hh" +#include "trick/MonteVarCalculated.hh" +#include "trick/MonteVarFile.hh" +#include "trick/MonteVarFixed.hh" +#include "trick/MonteVarRandom.hh" +#include "trick/montecarlo_c_intf.h" +#include "trick/exec_proto.h" +#include "trick/exec_proto.hh" +#include "trick/SimObject.hh" +#include "trick/MemoryManager.hh" +#include "trick/memorymanager_c_intf.h" +#include "trick/rand_generator.h" +//#include "trick/RequirementScribe.hh" void sig_hand(int sig) ; void child_handler(int sig) ; @@ -83,7 +83,7 @@ class MonteCarloTest : public ::testing::Test { Trick::MonteCarlo exec; Trick::Executive executive; testSimObject so1 ; - Trick::RequirementScribe req; + //Trick::RequirementScribe req; Trick::MemoryManager mm ; MonteCarloTest() { exec_register_scheduler(&exec) ; } @@ -103,7 +103,7 @@ class MonteCarloTest : public ::testing::Test { } ; TEST_F(MonteCarloTest , Job_Queue_Master_Init) { - req.add_requirement("722132127"); + //req.add_requirement("722132127"); Trick::JobData * curr_job ; @@ -119,7 +119,7 @@ TEST_F(MonteCarloTest , Job_Queue_Master_Init) { } TEST_F(MonteCarloTest , Job_Queue_Master_Pre) { - req.add_requirement("587551115"); + //req.add_requirement("587551115"); Trick::JobData * curr_job ; @@ -135,7 +135,7 @@ TEST_F(MonteCarloTest , Job_Queue_Master_Pre) { } TEST_F(MonteCarloTest , Job_Queue_Master_Post) { - req.add_requirement("4165308678"); + //req.add_requirement("4165308678"); Trick::JobData * curr_job ; @@ -151,7 +151,7 @@ TEST_F(MonteCarloTest , Job_Queue_Master_Post) { } TEST_F(MonteCarloTest , Job_Queue_Master_Shutdown) { - req.add_requirement("3461634900"); + //req.add_requirement("3461634900"); Trick::JobData * curr_job ; @@ -167,7 +167,7 @@ TEST_F(MonteCarloTest , Job_Queue_Master_Shutdown) { } TEST_F(MonteCarloTest , Job_Queue_Slave_Init) { - req.add_requirement("1412318284"); + //req.add_requirement("1412318284"); Trick::JobData * curr_job ; @@ -183,7 +183,7 @@ TEST_F(MonteCarloTest , Job_Queue_Slave_Init) { } TEST_F(MonteCarloTest , Job_Queue_Slave_Pre) { - req.add_requirement("3301658297"); + //req.add_requirement("3301658297"); Trick::JobData * curr_job ; @@ -199,7 +199,7 @@ TEST_F(MonteCarloTest , Job_Queue_Slave_Pre) { } TEST_F(MonteCarloTest , Job_Queue_Slave_Post) { - req.add_requirement("3882184138"); + //req.add_requirement("3882184138"); Trick::JobData * curr_job ; @@ -215,7 +215,7 @@ TEST_F(MonteCarloTest , Job_Queue_Slave_Post) { } TEST_F(MonteCarloTest , Job_Queue_Slave_Shutdown) { - req.add_requirement("350185460"); + //req.add_requirement("350185460"); Trick::JobData * curr_job ; @@ -231,7 +231,7 @@ TEST_F(MonteCarloTest , Job_Queue_Slave_Shutdown) { } TEST_F(MonteCarloTest , Good_Initialization) { - req.add_requirement("1452306647"); + //req.add_requirement("1452306647"); exec_add_sim_object(&so1 , "so1") ; EXPECT_EQ(exec.execute_monte() , 0 ) ; @@ -254,7 +254,7 @@ TEST_F(MonteCarloTest , TestDefaultValues) { } TEST_F(MonteCarloTest, TestSettingValues) { - req.add_requirement("2840823120"); + //req.add_requirement("2840823120"); exec.set_enabled(true) ; EXPECT_EQ(exec.get_enabled(), true) ; @@ -292,7 +292,7 @@ TEST_F(MonteCarloTest, TestRanges) { } TEST_F(MonteCarloTest, TestSlaves) { - req.add_requirement("1098748189"); + //req.add_requirement("1098748189"); Trick::MonteSlave slave0("localhost") ; Trick::MonteSlave slave1("WonderWoman") ; @@ -321,7 +321,7 @@ TEST_F(MonteCarloTest, TestSlaves) { TEST_F(MonteCarloTest, MonteVarFile) { std::string buffer; std::string buffer2; - req.add_requirement("3932595803"); + //req.add_requirement("3932595803"); // Test MonteVarFile Trick::MonteVarFile var0("time_to_fire_1", "M_jet_firings_inline", 2) ; @@ -334,7 +334,7 @@ TEST_F(MonteCarloTest, MonteVarFile) { TEST_F(MonteCarloTest, MonteVarRandom_Gaussian) { std::string str; double value; - req.add_requirement("3932595803"); + //req.add_requirement("3932595803"); // Test MonteVarRandom // Gaussian @@ -366,7 +366,7 @@ TEST_F(MonteCarloTest, MonteVarRandom_Gaussian) { TEST_F(MonteCarloTest, MonteVarRandom_Poisson) { std::string str; double value; - req.add_requirement("3932595803"); + //req.add_requirement("3932595803"); // Test MonteVarRandom // Poisson @@ -401,7 +401,7 @@ TEST_F(MonteCarloTest, MonteVarRandom_Poisson) { TEST_F(MonteCarloTest, MonteVarRandom_Flat) { std::string str; double value; - req.add_requirement("3932595803"); + //req.add_requirement("3932595803"); // Test MonteVarRandom // Flat @@ -428,7 +428,7 @@ TEST_F(MonteCarloTest, MonteVarRandom_Flat) { } TEST_F(MonteCarloTest, MonteVarRandom_NonGSL) { - req.add_requirement("3932595803"); + //req.add_requirement("3932595803"); Trick::MonteVarRandom var4("time_to_fire_1", Trick::MonteVarRandom::GAUSSIAN) ; var4.set_mu(4.0) ; @@ -451,7 +451,7 @@ TEST_F(MonteCarloTest, MonteVarRandom_NonGSL) { } TEST_F(MonteCarloTest, MonteVarFixed) { - req.add_requirement("3932595803"); + //req.add_requirement("3932595803"); // Test MonteVarFixed Trick::MonteVarFixed var5("time_to_fire_5", 3.1415) ; @@ -464,7 +464,7 @@ TEST_F(MonteCarloTest, MonteVarFixed) { ///@brief check that the final distribution is correct. (Bug 6950: The non-GSL was wrong for GAUSSIAN and FLAT) TEST_F(MonteCarloTest, MonteVarRandom_Gaussian_distributionMatchesSpec) { - req.add_requirement("3932595803"); + //req.add_requirement("3932595803"); std::string str ; double value ; @@ -517,7 +517,7 @@ TEST_F(MonteCarloTest, MonteVarRandom_Gaussian_distributionMatchesSpec) { ///@brief set_sigma_range(int) feature was only implemented for nonGsl with non-C++11 fallbacks TEST_F(MonteCarloTest, MonteVarRandom_Gaussian_nonGslSigmaRangeDefaulted_maxDeviationFromMeanIs1Sigma) { - req.add_requirement("3932595803"); + //req.add_requirement("3932595803"); std::string str ; double value ; @@ -569,7 +569,7 @@ TEST_F(MonteCarloTest, MonteVarRandom_Gaussian_nonGslSigmaRangeDefaulted_maxDevi ///@brief test set_sigma_range feature works for STL random TEST_F(MonteCarloTest, MonteVarRandom_StlGaussian_nonGslSigmaRangeDefaulted_maxDeviationFromMeanIs1Sigma) { - req.add_requirement("3932595803"); + //req.add_requirement("3932595803"); std::string str ; double value ; @@ -625,7 +625,7 @@ TEST_F(MonteCarloTest, MonteVarRandom_StlGaussian_nonGslSigmaRangeDefaulted_maxD #if (defined(_HAVE_TR1_RANDOM) || defined(_HAVE_STL_RANDOM)) TEST_F(MonteCarloTest, MonteVarRandom_StlGaussian_distributionMatchesSpec) { - req.add_requirement("3932595803"); + //req.add_requirement("3932595803"); std::string str ; double value ; @@ -676,7 +676,7 @@ TEST_F(MonteCarloTest, MonteVarRandom_StlGaussian_distributionMatchesSpec) { ///@breif test relative min/max work as expected for STL TEST_F(MonteCarloTest, MonteVarRandom_StlGaussian_relativeMinMaxWorks) { - req.add_requirement("3932595803"); + //req.add_requirement("3932595803"); std::string str ; double value ; @@ -723,7 +723,7 @@ TEST_F(MonteCarloTest, MonteVarRandom_StlGaussian_relativeMinMaxWorks) { ///@breif test relative min/max works after calling set_mu, as expected for STL TEST_F(MonteCarloTest, MonteVarRandom_StlGaussian_callSetMu_relativeMinMaxWorks) { - req.add_requirement("3932595803"); + //req.add_requirement("3932595803"); std::string str ; double value ; @@ -771,7 +771,7 @@ TEST_F(MonteCarloTest, MonteVarRandom_StlGaussian_callSetMu_relativeMinMaxWorks) ///@breif test absolute min/max works after changing from relative, as expected for STL TEST_F(MonteCarloTest, MonteVarRandom_StlGaussian_changeToAbsolute_MinMaxWorks) { - req.add_requirement("3932595803"); + //req.add_requirement("3932595803"); std::string str ; double value ; @@ -819,7 +819,7 @@ TEST_F(MonteCarloTest, MonteVarRandom_StlGaussian_changeToAbsolute_MinMaxWorks) ///@brief test that the sequence repeats after calling set_seed TEST_F(MonteCarloTest, MonteVarRandom_StlGaussian_setSeed_TakesEffect) { - req.add_requirement("3932595803"); + //req.add_requirement("3932595803"); std::string str ; double value ; diff --git a/trick_source/sim_services/ScheduledJobQueue/test/.gitignore b/trick_source/sim_services/ScheduledJobQueue/test/.gitignore new file mode 100644 index 00000000..098cdd8f --- /dev/null +++ b/trick_source/sim_services/ScheduledJobQueue/test/.gitignore @@ -0,0 +1,2 @@ +*.o +ScheduledJobQueue_test diff --git a/trick_source/sim_services/ScheduledJobQueue/test/Makefile b/trick_source/sim_services/ScheduledJobQueue/test/Makefile index 669ee1a4..617e7f26 100644 --- a/trick_source/sim_services/ScheduledJobQueue/test/Makefile +++ b/trick_source/sim_services/ScheduledJobQueue/test/Makefile @@ -5,20 +5,20 @@ # make TARGET - makes the given target. # make clean - removes all files generated by make. -include ${TRICK_HOME}/makefiles/Makefile.common +include ${TRICK_HOME}/share/trick/makefiles/Makefile.common # Flags passed to the preprocessor. -TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/trick_source -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 +TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 -TRICK_LIBS = ${TRICK_HOME}/lib_${TRICK_HOST_CPU}/libtrick.a +TRICK_LIBS = ${TRICK_LIB_DIR}/libtrick.a TRICK_EXEC_LINK_LIBS += ${GTEST_HOME}/lib/libgtest.a ${GTEST_HOME}/lib/libgtest_main.a # All tests produced by this Makefile. Remember to add new tests you # created to the list. TESTS = ScheduledJobQueue_test -OTHER_OBJECTS = ../../SimObject/object_${TRICK_HOST_CPU}/io_JobData.o \ - ../../SimObject/object_${TRICK_HOST_CPU}/io_SimObject.o +OTHER_OBJECTS = ../../include/object_${TRICK_HOST_CPU}/io_JobData.o \ + ../../include/object_${TRICK_HOST_CPU}/io_SimObject.o # House-keeping build targets. diff --git a/trick_source/sim_services/ScheduledJobQueue/test/ScheduledJobQueue_test.cpp b/trick_source/sim_services/ScheduledJobQueue/test/ScheduledJobQueue_test.cpp index aed974d4..9880793c 100644 --- a/trick_source/sim_services/ScheduledJobQueue/test/ScheduledJobQueue_test.cpp +++ b/trick_source/sim_services/ScheduledJobQueue/test/ScheduledJobQueue_test.cpp @@ -4,8 +4,8 @@ #include #include "gtest/gtest.h" -#include "sim_services/ScheduledJobQueue/include/ScheduledJobQueue.hh" -#include "trick_utils/reqs/include/RequirementScribe.hh" +#include "trick/ScheduledJobQueue.hh" +//#include "trick/RequirementScribe.hh" namespace Trick { @@ -13,7 +13,7 @@ class ScheduledJobQueueTest : public ::testing::Test { protected: Trick::ScheduledJobQueue sjq; - Trick::RequirementScribe req; + //Trick::RequirementScribe req; ScheduledJobQueueTest() {} ~ScheduledJobQueueTest() {} @@ -23,7 +23,7 @@ class ScheduledJobQueueTest : public ::testing::Test { } ; TEST_F( ScheduledJobQueueTest , PushJobsbyJobOrder ) { - req.add_requirement("815793485"); + //req.add_requirement("815793485"); Trick::JobData * job_ptr ; @@ -71,7 +71,7 @@ TEST_F( ScheduledJobQueueTest , PushJobsbyJobOrder ) { } TEST_F( ScheduledJobQueueTest , PushJobsbySimObjectOrder ) { - req.add_requirement("512154259"); + //req.add_requirement("512154259"); Trick::JobData * job_ptr ; @@ -114,7 +114,7 @@ TEST_F( ScheduledJobQueueTest , PushJobsbySimObjectOrder ) { } TEST_F( ScheduledJobQueueTest , PushJobsbyPhaseOrder ) { - req.add_requirement("3144632784"); + //req.add_requirement("3144632784"); Trick::JobData * job_ptr ; @@ -157,7 +157,7 @@ TEST_F( ScheduledJobQueueTest , PushJobsbyPhaseOrder ) { } TEST_F( ScheduledJobQueueTest , PushJobsbyJobClassOrder ) { - req.add_requirement("925196430"); + //req.add_requirement("925196430"); Trick::JobData * job_ptr ; @@ -200,7 +200,7 @@ TEST_F( ScheduledJobQueueTest , PushJobsbyJobClassOrder ) { } TEST_F( ScheduledJobQueueTest , PushJobsIgnoreSimObject ) { - req.add_requirement("815793485"); + //req.add_requirement("815793485"); Trick::JobData * job_ptr ; @@ -243,7 +243,7 @@ TEST_F( ScheduledJobQueueTest , PushJobsIgnoreSimObject ) { } TEST_F( ScheduledJobQueueTest , TopJob ) { - req.add_requirement(""); + //req.add_requirement(""); Trick::JobData * job_ptr ; @@ -285,7 +285,7 @@ TEST_F( ScheduledJobQueueTest , TopJob ) { } TEST_F( ScheduledJobQueueTest , FindNextJob ) { - req.add_requirement("3664773300 1758653947"); + //req.add_requirement("3664773300 1758653947"); Trick::JobData * job_ptr ; long long curr_time ; @@ -399,7 +399,7 @@ TEST_F( ScheduledJobQueueTest , FindNextJob ) { } TEST_F( ScheduledJobQueueTest , TestNextJob ) { - req.add_requirement("1758653947 3664773300"); + //req.add_requirement("1758653947 3664773300"); Trick::JobData * job_ptr ; long long curr_time ; @@ -517,7 +517,7 @@ TEST_F( ScheduledJobQueueTest , TestNextJob ) { } TEST_F( ScheduledJobQueueTest , InstrumentBeforeAll ) { - req.add_requirement("3990429752"); + //req.add_requirement("3990429752"); Trick::JobData * job_ptr ; diff --git a/trick_source/sim_services/Timer/test/.gitignore b/trick_source/sim_services/Timer/test/.gitignore new file mode 100644 index 00000000..611d4db1 --- /dev/null +++ b/trick_source/sim_services/Timer/test/.gitignore @@ -0,0 +1,2 @@ +*.o +ITimer_test diff --git a/trick_source/sim_services/Timer/test/ITimer_test.cpp b/trick_source/sim_services/Timer/test/ITimer_test.cpp index 11abdac3..cab4fb59 100644 --- a/trick_source/sim_services/Timer/test/ITimer_test.cpp +++ b/trick_source/sim_services/Timer/test/ITimer_test.cpp @@ -11,10 +11,10 @@ #include #include "gtest/gtest.h" -#include "sim_services/Timer/include/ITimer.hh" -#include "sim_services/Clock/include/GetTimeOfDayClock.hh" -#include "sim_services/SimObject/include/SimObject.hh" -#include "trick_utils/reqs/include/RequirementScribe.hh" +#include "trick/ITimer.hh" +#include "trick/GetTimeOfDayClock.hh" +#include "trick/SimObject.hh" +//#include "trick/RequirementScribe.hh" namespace Trick { @@ -22,7 +22,7 @@ class ITimerTest : public testing::Test { public: Trick::GetTimeOfDayClock dClk; - Trick::RequirementScribe req; + //Trick::RequirementScribe req; double sec; long long tim_st, tim_elap; @@ -34,7 +34,7 @@ class ITimerTest : public testing::Test { /* Proper initialization of ITimer */ TEST_F(ITimerTest, Initialize) { - req.add_requirement("timer"); + //req.add_requirement("timer"); //"The ITimer shall initialize with disabled and inactive status."); Trick::ITimer *iTim; @@ -56,7 +56,7 @@ TEST_F(ITimerTest, Initialize) { /* Timer not enabled; ensure no activity when starting, pausing, etc */ TEST_F(ITimerTest, TimerNotEnabled) { - req.add_requirement("timer"); + //req.add_requirement("timer"); //"The ITimer shall start if and only if the ITimer is enabled to do so."); @@ -84,7 +84,7 @@ TEST_F(ITimerTest, TimerNotEnabled) { /* Tolerance: 2 ms */ TEST_F(ITimerTest, TimerStartSuccess) { - req.add_requirement("timer"); + //req.add_requirement("timer"); //"The ITimer shall sleep when commanded, thereby releasing the processor for a specified amount of time."); sec = 0.05; @@ -110,7 +110,7 @@ TEST_F(ITimerTest, TimerStartSuccess) { } TEST_F(ITimerTest, TimerStartReset) { - req.add_requirement("timer"); + //req.add_requirement("timer"); //"The ITimer shall reset to a new alarm time when commanded if the current time until alarm has not yet expired."); sec = 0.05; @@ -138,7 +138,7 @@ TEST_F(ITimerTest, TimerStartReset) { } TEST_F(ITimerTest, TimerStartStop) { - req.add_requirement("timer"); + //req.add_requirement("timer"); //"The ITimer shall stop when commanded if the time until alarm has not yet expired."); sec = 0.05; @@ -171,7 +171,7 @@ TEST_F(ITimerTest, TimerStartStop) { TEST_F(ITimerTest, TimerStartFailure) { - req.add_requirement("timer"); + //req.add_requirement("timer"); //"The ITimer shall not initiate with start times that are negative or less than 10 ms"); sec = 0.05; diff --git a/trick_source/sim_services/Timer/test/Makefile b/trick_source/sim_services/Timer/test/Makefile index a18b7302..ec576912 100644 --- a/trick_source/sim_services/Timer/test/Makefile +++ b/trick_source/sim_services/Timer/test/Makefile @@ -5,20 +5,20 @@ # make TARGET - makes the given target. # make clean - removes all files generated by make. -include ${TRICK_HOME}/makefiles/Makefile.common +include ${TRICK_HOME}/share/trick/makefiles/Makefile.common # Flags passed to the preprocessor. -TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/trick_source -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 +TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 -TRICK_LIBS = ${TRICK_HOME}/lib_${TRICK_HOST_CPU}/libtrick.a +TRICK_LIBS = ${TRICK_LIB_DIR}/libtrick.a TRICK_EXEC_LINK_LIBS += ${GTEST_HOME}/lib/libgtest.a ${GTEST_HOME}/lib/libgtest_main.a # All tests produced by this Makefile. Remember to add new tests you # created to the list. TESTS = ITimer_test -OTHER_OBJECTS = ../../SimObject/object_${TRICK_HOST_CPU}/io_JobData.o \ - ../../SimObject/object_${TRICK_HOST_CPU}/io_SimObject.o +OTHER_OBJECTS = ../../include/object_${TRICK_HOST_CPU}/io_JobData.o \ + ../../include/object_${TRICK_HOST_CPU}/io_SimObject.o # House-keeping build targets. diff --git a/trick_source/sim_services/mains/master.cpp b/trick_source/sim_services/mains/master.cpp index 21e425d0..72c8a46e 100644 --- a/trick_source/sim_services/mains/master.cpp +++ b/trick_source/sim_services/mains/master.cpp @@ -18,7 +18,7 @@ PROGRAMMERS: ( (Robert W. Bailey) (LinCom) (April 1992) ) //TODO move to proto void memory_init(void); -int main( int nargs, char **args) { +int master( int nargs, char **args) { int ret ; diff --git a/trick_source/trick_utils/comm/test/.gitignore b/trick_source/trick_utils/comm/test/.gitignore new file mode 100644 index 00000000..3a81f610 --- /dev/null +++ b/trick_source/trick_utils/comm/test/.gitignore @@ -0,0 +1 @@ +comm_test diff --git a/trick_source/trick_utils/comm/test/Makefile b/trick_source/trick_utils/comm/test/Makefile index 533f0f39..f48a0211 100644 --- a/trick_source/trick_utils/comm/test/Makefile +++ b/trick_source/trick_utils/comm/test/Makefile @@ -1,10 +1,10 @@ -include ${TRICK_HOME}/makefiles/Makefile.common -include ${TRICK_HOME}/makefiles/Makefile.tricklib +include ${TRICK_HOME}/share/trick/makefiles/Makefile.common +include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib -INCLUDE_DIRS = -I$(GTEST_HOME) -I$(GTEST_HOME)/include -I$(TRICK_HOME)/trick_source +INCLUDE_DIRS = -I$(GTEST_HOME) -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -TRICK_LIBS := ${TRICK_HOME}/lib_${TRICK_HOST_CPU}/libtrick.a +TRICK_LIBS := ${TRICK_LIB_DIR}/libtrick.a TRICK_EXEC_LINK_LIBS += ${GTEST_HOME}/lib/libgtest.a ${GTEST_HOME}/lib/libgtest_main.a TRICK_CXXFLAGS += ${INCLUDE_DIRS} -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 @@ -13,7 +13,7 @@ TRICK_CXXFLAGS += ${INCLUDE_DIRS} -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 TESTS = comm_test TEST_CPP = $(subst $(OBJ_DIR)/,,$(subst .o,.cpp,$(CPP_OBJS))) -OTHER_OBJECTS = ../../../sim_services/SimObject/object_${TRICK_HOST_CPU}/io_SimObject.o +OTHER_OBJECTS = ../../../sim_services/include/object_${TRICK_HOST_CPU}/io_SimObject.o default : all diff --git a/trick_source/trick_utils/comm/test/TCBlockioTest.cpp b/trick_source/trick_utils/comm/test/TCBlockioTest.cpp index fee46e9e..4ddab19d 100644 --- a/trick_source/trick_utils/comm/test/TCBlockioTest.cpp +++ b/trick_source/trick_utils/comm/test/TCBlockioTest.cpp @@ -1,11 +1,11 @@ #include -#include "trick_utils/comm/include/tc.h" -#include "trick_utils/comm/include/attributes.h" -#include "trick_utils/comm/include/hs_msg.h" -#include "trick_utils/comm/include/tc_proto.h" -#include "trick_utils/comm/include/trick_byteswap.h" -#include "trick_utils/comm/include/trick_error_hndlr.h" +#include "trick/tc.h" +#include "trick/attributes.h" +#include "trick/hs_msg.h" +#include "trick/tc_proto.h" +#include "trick/trick_byteswap.h" +#include "trick/trick_error_hndlr.h" class TCBlockioTest : public testing::Test { diff --git a/trick_source/trick_utils/comm/test/TCConnectTest.cpp b/trick_source/trick_utils/comm/test/TCConnectTest.cpp index 6822ff54..d9f92d7f 100644 --- a/trick_source/trick_utils/comm/test/TCConnectTest.cpp +++ b/trick_source/trick_utils/comm/test/TCConnectTest.cpp @@ -1,12 +1,12 @@ #include -#include "trick_utils/comm/include/tc.h" -#include "trick_utils/comm/include/tc_proto.h" -#include "trick_utils/comm/include/attributes.h" -#include "trick_utils/comm/include/hs_msg.h" -#include "trick_utils/comm/include/trick_byteswap.h" -#include "trick_utils/comm/include/trick_error_hndlr.h" +#include "trick/tc.h" +#include "trick/tc_proto.h" +#include "trick/attributes.h" +#include "trick/hs_msg.h" +#include "trick/trick_byteswap.h" +#include "trick/trick_error_hndlr.h" class TCConnectTest : public testing::Test { diff --git a/trick_source/trick_utils/comm/test/TCDevCopyTest.cpp b/trick_source/trick_utils/comm/test/TCDevCopyTest.cpp index 1234c2be..9dfc2a9a 100644 --- a/trick_source/trick_utils/comm/test/TCDevCopyTest.cpp +++ b/trick_source/trick_utils/comm/test/TCDevCopyTest.cpp @@ -1,12 +1,12 @@ #include -#include "trick_utils/comm/include/tc.h" -#include "trick_utils/comm/include/attributes.h" -#include "trick_utils/comm/include/hs_msg.h" -#include "trick_utils/comm/include/tc_proto.h" -#include "trick_utils/comm/include/trick_byteswap.h" -#include "trick_utils/comm/include/trick_error_hndlr.h" +#include "trick/tc.h" +#include "trick/attributes.h" +#include "trick/hs_msg.h" +#include "trick/tc_proto.h" +#include "trick/trick_byteswap.h" +#include "trick/trick_error_hndlr.h" class TCDevCopyTest : public testing::Test { diff --git a/trick_source/trick_utils/comm/test/TCDisconnectTest.cpp b/trick_source/trick_utils/comm/test/TCDisconnectTest.cpp index 4d9f9f49..b216ff81 100644 --- a/trick_source/trick_utils/comm/test/TCDisconnectTest.cpp +++ b/trick_source/trick_utils/comm/test/TCDisconnectTest.cpp @@ -1,12 +1,12 @@ #include -#include "trick_utils/comm/include/tc.h" -#include "trick_utils/comm/include/attributes.h" -#include "trick_utils/comm/include/hs_msg.h" -#include "trick_utils/comm/include/tc_proto.h" -#include "trick_utils/comm/include/trick_byteswap.h" -#include "trick_utils/comm/include/trick_error_hndlr.h" +#include "trick/tc.h" +#include "trick/attributes.h" +#include "trick/hs_msg.h" +#include "trick/tc_proto.h" +#include "trick/trick_byteswap.h" +#include "trick/trick_error_hndlr.h" class TCDisconnectTest : public testing::Test { diff --git a/trick_source/trick_utils/comm/test/TCErrorTest.cpp b/trick_source/trick_utils/comm/test/TCErrorTest.cpp index b9548265..9fa4d89f 100644 --- a/trick_source/trick_utils/comm/test/TCErrorTest.cpp +++ b/trick_source/trick_utils/comm/test/TCErrorTest.cpp @@ -1,12 +1,12 @@ #include -#include "trick_utils/comm/include/tc.h" -#include "trick_utils/comm/include/attributes.h" -#include "trick_utils/comm/include/hs_msg.h" -#include "trick_utils/comm/include/tc_proto.h" -#include "trick_utils/comm/include/trick_byteswap.h" -#include "trick_utils/comm/include/trick_error_hndlr.h" +#include "trick/tc.h" +#include "trick/attributes.h" +#include "trick/hs_msg.h" +#include "trick/tc_proto.h" +#include "trick/trick_byteswap.h" +#include "trick/trick_error_hndlr.h" class TCErrorTest : public testing::Test { diff --git a/trick_source/trick_utils/comm/test/TCIsValidTest.cpp b/trick_source/trick_utils/comm/test/TCIsValidTest.cpp index d3da3e0f..59dbe98e 100644 --- a/trick_source/trick_utils/comm/test/TCIsValidTest.cpp +++ b/trick_source/trick_utils/comm/test/TCIsValidTest.cpp @@ -1,12 +1,12 @@ #include -#include "trick_utils/comm/include/tc.h" -#include "trick_utils/comm/include/tc_proto.h" -#include "trick_utils/comm/include/attributes.h" -#include "trick_utils/comm/include/hs_msg.h" -#include "trick_utils/comm/include/trick_byteswap.h" -#include "trick_utils/comm/include/trick_error_hndlr.h" +#include "trick/tc.h" +#include "trick/tc_proto.h" +#include "trick/attributes.h" +#include "trick/hs_msg.h" +#include "trick/trick_byteswap.h" +#include "trick/trick_error_hndlr.h" class TCIsValidTest : public testing::Test { diff --git a/trick_source/trick_utils/comm/test/TCPendingTest.cpp b/trick_source/trick_utils/comm/test/TCPendingTest.cpp index 75b3b3af..e3b35f1c 100644 --- a/trick_source/trick_utils/comm/test/TCPendingTest.cpp +++ b/trick_source/trick_utils/comm/test/TCPendingTest.cpp @@ -1,12 +1,12 @@ #include -#include "trick_utils/comm/include/tc.h" -#include "trick_utils/comm/include/attributes.h" -#include "trick_utils/comm/include/hs_msg.h" -#include "trick_utils/comm/include/tc_proto.h" -#include "trick_utils/comm/include/trick_byteswap.h" -#include "trick_utils/comm/include/trick_error_hndlr.h" +#include "trick/tc.h" +#include "trick/attributes.h" +#include "trick/hs_msg.h" +#include "trick/tc_proto.h" +#include "trick/trick_byteswap.h" +#include "trick/trick_error_hndlr.h" class TCPendingTest : public testing::Test { diff --git a/trick_source/trick_utils/comm/test/TCReadByteSwapTest.cpp b/trick_source/trick_utils/comm/test/TCReadByteSwapTest.cpp index f492b4c0..3e7ec9de 100644 --- a/trick_source/trick_utils/comm/test/TCReadByteSwapTest.cpp +++ b/trick_source/trick_utils/comm/test/TCReadByteSwapTest.cpp @@ -1,12 +1,12 @@ #include -#include "trick_utils/comm/include/tc.h" -#include "trick_utils/comm/include/attributes.h" -#include "trick_utils/comm/include/hs_msg.h" -#include "trick_utils/comm/include/tc_proto.h" -#include "trick_utils/comm/include/trick_byteswap.h" -#include "trick_utils/comm/include/trick_error_hndlr.h" +#include "trick/tc.h" +#include "trick/attributes.h" +#include "trick/hs_msg.h" +#include "trick/tc_proto.h" +#include "trick/trick_byteswap.h" +#include "trick/trick_error_hndlr.h" class TCReadByteSwapTest : public testing::Test { diff --git a/trick_source/trick_utils/comm/test/TCSetBlockIOTest.cpp b/trick_source/trick_utils/comm/test/TCSetBlockIOTest.cpp index ac5054a6..87d71551 100644 --- a/trick_source/trick_utils/comm/test/TCSetBlockIOTest.cpp +++ b/trick_source/trick_utils/comm/test/TCSetBlockIOTest.cpp @@ -1,12 +1,12 @@ #include -#include "trick_utils/comm/include/tc.h" -#include "trick_utils/comm/include/attributes.h" -#include "trick_utils/comm/include/hs_msg.h" -#include "trick_utils/comm/include/tc_proto.h" -#include "trick_utils/comm/include/trick_byteswap.h" -#include "trick_utils/comm/include/trick_error_hndlr.h" +#include "trick/tc.h" +#include "trick/attributes.h" +#include "trick/hs_msg.h" +#include "trick/tc_proto.h" +#include "trick/trick_byteswap.h" +#include "trick/trick_error_hndlr.h" class TCSetBlockIOTest : public testing::Test { diff --git a/trick_source/trick_utils/interpolator/test/.gitignore b/trick_source/trick_utils/interpolator/test/.gitignore new file mode 100644 index 00000000..ad47b65c --- /dev/null +++ b/trick_source/trick_utils/interpolator/test/.gitignore @@ -0,0 +1,2 @@ +*.o +Interpolator_unittest diff --git a/trick_source/trick_utils/interpolator/test/Interpolator_unittest.cc b/trick_source/trick_utils/interpolator/test/Interpolator_unittest.cc index d5ef2cea..cfe433f0 100644 --- a/trick_source/trick_utils/interpolator/test/Interpolator_unittest.cc +++ b/trick_source/trick_utils/interpolator/test/Interpolator_unittest.cc @@ -1,14 +1,14 @@ #include #include -#include "trick_utils/interpolator/include/Interpolator.hh" -#include "trick_utils/reqs/include/RequirementScribe.hh" +#include "trick/Interpolator.hh" +//#include "trick/RequirementScribe.hh" #define EXCEPTABLE_ERROR 0.2 TEST(Interpolator_unittest, OneDimension) { - Trick::RequirementScribe req; - req.add_requirement("3369678360"); + //Trick::RequirementScribe req; + //req.add_requirement("3369678360"); bool exception_thrown; double result; @@ -94,8 +94,8 @@ TEST(Interpolator_unittest, TwoDimension) { // Reference: http://en.wikipedia.org/wiki/Body_mass_index // - Trick::RequirementScribe req; - req.add_requirement("715834524"); + //Trick::RequirementScribe req; + //req.add_requirement("715834524"); double weight_lb[] = { 88.2, 110.25, 132.3, 154.35, 176.4, 198.45, 220.5, 242.55, 264.65, 286.65, 308.6, 330.75, 352.7}; diff --git a/trick_source/trick_utils/interpolator/test/Makefile b/trick_source/trick_utils/interpolator/test/Makefile index 34c066b0..78524fa3 100644 --- a/trick_source/trick_utils/interpolator/test/Makefile +++ b/trick_source/trick_utils/interpolator/test/Makefile @@ -5,12 +5,12 @@ # make TARGET - makes the given target. # make clean - removes all files generated by make. -include ${TRICK_HOME}/makefiles/Makefile.common +include ${TRICK_HOME}/share/trick/makefiles/Makefile.common # Flags passed to the preprocessor. -TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/trick_source -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 +TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 -TRICK_LIBS = ${TRICK_HOME}/lib_${TRICK_HOST_CPU}/libtrick.a +TRICK_LIBS = ${TRICK_LIB_DIR}/libtrick.a TRICK_EXEC_LINK_LIBS += ${GTEST_HOME}/lib/libgtest.a ${GTEST_HOME}/lib/libgtest_main.a diff --git a/trick_source/trick_utils/units/test/.gitignore b/trick_source/trick_utils/units/test/.gitignore new file mode 100644 index 00000000..cae4b199 --- /dev/null +++ b/trick_source/trick_utils/units/test/.gitignore @@ -0,0 +1,3 @@ +*.o +UnitConvTestSuite +UnitTestSuite diff --git a/trick_source/trick_utils/units/test/UnitConvTestSuite.cpp b/trick_source/trick_utils/units/test/UnitConvTestSuite.cpp index b69cd47d..9b007b6c 100644 --- a/trick_source/trick_utils/units/test/UnitConvTestSuite.cpp +++ b/trick_source/trick_utils/units/test/UnitConvTestSuite.cpp @@ -1,6 +1,6 @@ #include -#include "../include/units_conv.h" +#include "trick/units_conv.h" #define TOL 1e-13 /* diff --git a/trick_source/trick_utils/units/test/UnitTestSuite.cpp b/trick_source/trick_utils/units/test/UnitTestSuite.cpp index 41643859..5a37dc77 100644 --- a/trick_source/trick_utils/units/test/UnitTestSuite.cpp +++ b/trick_source/trick_utils/units/test/UnitTestSuite.cpp @@ -1,8 +1,8 @@ #include -#include "../include/Unit.hh" +#include "trick/Unit.hh" #include -#include "trick_utils/reqs/include/RequirementScribe.hh" +//#include "trick_utils/reqs/include/RequirementScribe.hh" /*********************FIXME********************************************************************************** * 1. The behavior of the conversion between composite units containing @@ -61,6 +61,7 @@ double tolerance(int exp) * cause an error **********************************************************************/ +#if 0 void units_requirements(bool isThrow) { Trick::RequirementScribe req; @@ -71,6 +72,7 @@ void units_requirements(bool isThrow) { } } +#endif void clean_up_UCFn(UCFn** ptr) { @@ -104,7 +106,7 @@ void test_conversion_no_throw(std::string unitString1, std::string unitString2, clean_up_UCFn(&cf); ASSERT_EQ((UCFn*) NULL, cf); - units_requirements(false); + //units_requirements(false); } @@ -165,13 +167,13 @@ void test_conversion_throw(std::string unitString1, std::string unitString2) } ASSERT_EQ((UCFn*) NULL, cf); - units_requirements(true); + //units_requirements(true); } class UnitConversion : public ::testing::Test { protected: - Trick::RequirementScribe testReq; + //Trick::RequirementScribe testReq; UnitConversion() {} ~UnitConversion() {} @@ -647,7 +649,7 @@ TEST_F(UnitConversion, FootPoundsToNewtonMeters) TEST_F(UnitConversion, FootPoundsToNewtonMetersWithConvertTo) { - testReq.add_requirement("2060756805"); + //testReq.add_requirement("2060756805"); ASSERT_NO_THROW(Unit NewtonMeter("N*m")); Unit NewtonMeter("N*m"); @@ -704,7 +706,7 @@ TEST_F(UnitConversion, PerSecondPerSecondToPerSecondSquared) TEST_F(UnitConversion, GetUnitName) { - testReq.add_requirement(""); + //testReq.add_requirement(""); Unit meter_per_second_squared("m/s2"); std::string unit = "m/s2"; @@ -716,7 +718,7 @@ TEST_F(UnitConversion, GetUnitName) TEST_F(UnitConversion, SetUnitName) { - testReq.add_requirement(""); + //testReq.add_requirement(""); Unit meter_per_second_squared("m/s2"); Unit copy; @@ -737,7 +739,7 @@ TEST_F(UnitConversion, SetUnitName) TEST_F(UnitConversion, InvalidUnit) { - testReq.add_requirement("2743423356"); + //testReq.add_requirement("2743423356"); std::cerr << "The purpose of this test is to throw to an exception. Error messages are expected." << std::endl; ASSERT_THROW(Unit u("foo"), Unit::CONVERSION_ERROR); @@ -751,7 +753,7 @@ TEST_F(UnitConversion, MissingProduct) TEST_F(UnitConversion, InvalidExponent) { - testReq.add_requirement("2743423356"); + //testReq.add_requirement("2743423356"); std::cerr << "The purpose of this test is to throw to an exception. Error messages are expected." << std::endl; ASSERT_THROW(Unit u("m4"), Unit::CONVERSION_ERROR); @@ -760,7 +762,7 @@ TEST_F(UnitConversion, InvalidExponent) TEST_F(UnitConversion, InvalidRatio) { - testReq.add_requirement("2743423356"); + //testReq.add_requirement("2743423356"); std::cerr << "The purpose of this test is to throw to an exception. Error messages are expected." << std::endl; ASSERT_THROW(Unit u("/C"), Unit::CONVERSION_ERROR); @@ -769,7 +771,7 @@ TEST_F(UnitConversion, InvalidRatio) TEST_F(UnitConversion, InvalidFootPound) { - testReq.add_requirement("2743423356"); + //testReq.add_requirement("2743423356"); std::cerr << "The purpose of this test is to throw to an exception. Error messages are expected." << std::endl; ASSERT_THROW(Unit u("lbfft"), Unit::CONVERSION_ERROR); } @@ -779,7 +781,7 @@ TEST_F(UnitConversion, InvalidFootPound) TEST_F(UnitConversion, NewtonMeterToInvalidFootPound) { - testReq.add_requirement("2743423356"); + //testReq.add_requirement("2743423356"); Unit unit1("N*m"); std::cerr << "The purpose of this test is to throw to an exception. Error messages are expected." << std::endl; diff --git a/trick_source/trick_utils/units/test/makefile b/trick_source/trick_utils/units/test/makefile index c20c0a2f..33b1b7d7 100644 --- a/trick_source/trick_utils/units/test/makefile +++ b/trick_source/trick_utils/units/test/makefile @@ -4,12 +4,12 @@ # make TARGET - makes the given target. # # make clean - removes all files generated by make. -include ${TRICK_HOME}/makefiles/Makefile.common +include ${TRICK_HOME}/share/trick/makefiles/Makefile.common # Flags passed to the preprocessor. -TRICK_CPPFLAGS += -I${GTEST_HOME}/include -I$(TRICK_HOME)/trick_source -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 +TRICK_CPPFLAGS += -I${GTEST_HOME}/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 -TRICK_LIBS = ${TRICK_HOME}/lib_${TRICK_HOST_CPU}/libtrick_units.a +TRICK_LIBS = ${TRICK_LIB_DIR}/libtrick_units.a TRICK_EXEC_LINK_LIBS += ${GTEST_HOME}/lib/libgtest.a ${GTEST_HOME}/lib/libgtest_main.a #Added pthreads for Ubuntu