Split test sims and fun sims into separate directories.

Moved SIM_test_ip and a couple of other sims that depend on the same model set
to a new test directory.  I'm doing a couple of sims at a time.

refs #191
This commit is contained in:
Alex Lin 2016-02-23 10:23:55 -06:00
parent 950e319c1b
commit 90fd0ff9f8
38 changed files with 4187 additions and 4327 deletions

View File

@ -283,6 +283,7 @@ $(UNIT_TEST_DIRS):
unit_test: $(UNIT_TEST_DIRS)
sim_test:
@ $(MAKE) -C test
@ $(MAKE) -C trick_sims test
#requirements:

View File

@ -63,11 +63,8 @@ else
LIBEXEC = lib
endif
# Do this section only once
ifeq ($(MAKELEVEL),0)
export TRICK_INCLUDES := -I${TRICK_HOME}/trick_source -I${TRICK_HOME}/include -I${TRICK_HOME}/include/trick/compat
export TRICK_VERSIONS := -DTRICK_VER=$(TRICK_MAJOR) -DTRICK_MINOR=$(TRICK_MINOR)
TRICK_INCLUDES := -I${TRICK_HOME}/trick_source -I${TRICK_HOME}/include -I${TRICK_HOME}/include/trick/compat
TRICK_VERSIONS := -DTRICK_VER=$(TRICK_MAJOR) -DTRICK_MINOR=$(TRICK_MINOR)
TRICK_SYSTEM_CFLAGS = $(TRICK_INCLUDES) $(TRICK_VERSIONS) -fpic
TRICK_SYSTEM_CXXFLAGS = $(TRICK_INCLUDES) $(TRICK_VERSIONS) -fpic
@ -90,17 +87,12 @@ ifeq ($(USE_ER7_UTILS), 1)
ER7_UTILS_HOME := $(TRICK_HOME)/trick_source/er7_utils
TRICK_SYSTEM_CFLAGS += -DUSE_ER7_UTILS_INTEGRATORS
TRICK_SYSTEM_CXXFLAGS += -DUSE_ER7_UTILS_INTEGRATORS
ifneq ($(wildcard ${ER7_UTILS_HOME}/CheckpointHelper),)
TRICK_LIBS += -ler7_utils
ifneq ($(wildcard ${ER7_UTILS_HOME}/CheckpointHelper),)
USE_ER7_UTILS_CHECKPOINTHELPER = 1
TRICK_SYSTEM_CFLAGS += -DUSE_ER7_UTILS_CHECKPOINTHELPER
TRICK_SYSTEM_CXXFLAGS += -DUSE_ER7_UTILS_CHECKPOINTHELPER
endif
endif
endif # MAKELEVEL = 0
ifeq ($(USE_ER7_UTILS), 1)
TRICK_LIBS += -ler7_utils
endif
endif
ifeq ($(TRICK_FORCE_32BIT), 1)

View File

@ -24,9 +24,7 @@ endif
SHARED_LIB_OPT := -shared
RPATH = -Wl,-rpath=${TRICK_LIB_DIR}
ifeq ($(MAKELEVEL),0)
export TRICK_LDFLAGS += -Wl,--export-dynamic
endif
TRICK_LDFLAGS = -Wl,--export-dynamic
PLATFORM_LIBS = -lrt
LD_WHOLE_ARCHIVE := -Wl,-whole-archive

26
test/.gitignore vendored Normal file
View File

@ -0,0 +1,26 @@
DP_rt_*.xml
makefile
S_job_execution
S_run_summary
send_hs
varserver_log
log_*
chkpnt_*
MONTE_RUN_*
.S_library*
.icg_no_found
CP_out
MAKE_out
Makefile_sim
Makefile_swig
S_default.dat
S_document.xml
S_library_list
S_main_*
S_sie.resource
S_source.cpp
S_source.hh
T_main_*
trick
jitlib
build

File diff suppressed because it is too large Load Diff

37
test/SIM_rti/S_define Normal file
View File

@ -0,0 +1,37 @@
/************************TRICK HEADER*************************
PURPOSE:
(This comment lists out the other object files that are not included from c++ headers)
LIBRARY DEPENDENCIES:
(
)
*************************************************************/
#include "sim_objects/default_trick_sys.sm"
##include "test_ip/include/ClassOfEverything.hh"
class testSimObject : public Trick::SimObject {
public:
ClassOfEverything obj ;
TEST_STRUCT t ;
my_ns::AA ns_test ;
testSimObject() {}
private:
testSimObject (const testSimObject &);
testSimObject & operator= (const testSimObject &);
} ;
// Instantiations
testSimObject test_so ;
// Connect objects
void create_connections() {
// Set the default termination time
trick_sys.sched.set_terminate_time(1.0) ;
trick_sys.sched.set_freeze_frame(0.10) ;
}

View File

@ -0,0 +1,2 @@
TRICK_CFLAGS += -I../models
TRICK_CXXFLAGS += -I../models

File diff suppressed because it is too large Load Diff

View File

@ -8,11 +8,10 @@ LIBRARY DEPENDENCIES:
#include "sim_objects/default_trick_sys.sm"
##include "test_ip/include/Ball_test.hh"
##include "test_ip/include/ClassOfEverything.hh"
##include "test_ip/include/OverloadedVariable.hh"
/* base ball... get it? :) */
class ballSimObject : public Trick::SimObject {
class testSimObject : public Trick::SimObject {
public:
bool test_false() {
@ -22,7 +21,7 @@ class ballSimObject : public Trick::SimObject {
return true ;
}
Ball_alex obj ;
ClassOfEverything obj ;
TEST_STRUCT t ;
my_ns::AA ns_test ;
Abstract * a ;
@ -39,24 +38,11 @@ class ballSimObject : public Trick::SimObject {
MomMom * mm ;
#endif
ballSimObject() {
("default_data") obj.force.default_data() ;
("default_data") obj.state.default_data() ;
("initialization") obj.state_init() ;
("derivative") obj.force_field() ;
("derivative") obj.state_deriv() ;
("integration") trick_ret = obj.state_integ() ;
(10.0, "scheduled") trick_ret = obj.state_print() ;
("freeze") obj.state_print() ;
}
testSimObject() {}
private:
ballSimObject (const ballSimObject &);
ballSimObject & operator= (const ballSimObject &);
testSimObject (const testSimObject &);
testSimObject & operator= (const testSimObject &);
} ;
@ -84,7 +70,7 @@ class disabledSimObject : public Trick::SimObject {
class emptySimObject : public Trick::SimObject {
public:
Ball_alex obj ;
ClassOfEverything obj ;
private:
emptySimObject (const emptySimObject &);
@ -105,7 +91,7 @@ class plainClass {
}
// Instantiations
ballSimObject ball ;
testSimObject test_so ;
disabledSimObject disabled_obj ;
template <class T, typename U>
@ -154,22 +140,10 @@ class InheritFromTemplatedSimObject : public TemplatedSimObject< int, double > {
InheritFromTemplatedSimObject iftso ;
// This collect can now be done in create_connections or the input file.
//collect ball.obj.state.work.external_force = {ball.obj.force.output.force[0]};
IntegLoop my_integ_loop (0.01) ball;
// Connect objects
void create_connections() {
// Set the default termination time
trick_sys.sched.set_terminate_time(300.0) ;
trick_sys.sched.set_terminate_time(1.0) ;
trick_sys.sched.set_freeze_frame(0.10) ;
my_integ_loop.getIntegrator( Runge_Kutta_2, 4 );
ball.obj.state.add_external_force( ball.obj.force.output.force ) ;
}

View File

@ -0,0 +1,3 @@
TRICK_ICG_EXCLUDE=${TRICK_HOME}/trick_models/exclude_me
TRICK_CFLAGS += -I../models
TRICK_CXXFLAGS += -I../models

View File

@ -0,0 +1,4 @@
TRICK_CFLAGS += -I../models
TRICK_CXXFLAGS += -I../models

View File

@ -3,20 +3,9 @@
@verbatim
PURPOSE:
(Ball model EOM state parameter definition.)
REFERENCES:
(((Bailey, R.W, and Paddock, E.J.)
(Trick Simulation Environment) (NASA:JSC #37943)
(JSC/Engineering Directorate/Automation, Robotics and Simulation Division)
(March 1997)))
ASSUMPTIONS AND LIMITATIONS:
((2 dimensional space)
(Translational EOM only))
(Test input processor)
LIBRARY DEPENDENCY:
((Ball_test.o))
PROGRAMMERS:
(((Robert W. Bailey) (Sweet Systems Inc) (March 1997) (Tutorial Lesson 1))
((Edwin Z. Crues)(Titan Systems Corp.)(Jan 2002)(Crude C++ translation)))
((ClassOfEverything.o))
@endverbatim
*******************************************************************************/
@ -35,7 +24,7 @@ PROGRAMMERS:
#include <sys/types.h>
// Model include files.
#include "Ball++/L1/../L1/include/Ball.hh"
#include "trick/mm_macros.hh"
#include "test_ip/include/NoICG.hh"
#include "exclude_me/include/exclude_me.hh"
#include "test_ip/include/Namespace_tests.hh"
@ -78,7 +67,7 @@ typedef const struct ConstStruct_ {
class AlsoCannotCopy {
friend class InputProcessor ;
friend void init_attrBall_alex() ;
friend void init_attrClassOfEverything() ;
public:
int i ;
@ -93,7 +82,7 @@ class AlsoCannotCopy {
class CannotCopy {
friend class InputProcessor ;
friend void init_attrBall_alex() ;
friend void init_attrClassOfEverything() ;
public:
int i ;
@ -182,15 +171,15 @@ typedef int Integer ;
typedef int AnotherInteger ;
typedef long long Myint64 ;
class Ball_alex : public Ball {
class ClassOfEverything {
friend class InputProcessor ;
friend void init_attrBall_alex() ;
friend void init_attrClassOfEverything() ;
public:
// Default constructor and destructor.
Ball_alex() ;
~Ball_alex() {};
ClassOfEverything() ;
~ClassOfEverything() {};
/* maybe someday we'll be able to do something like this. */
double d_test ; /* -- blah */
@ -391,8 +380,8 @@ class Ball_alex : public Ball {
typedef int sizeType ;
typedef double mydouble ;
Ball_alex::sizeType st ;
Ball_alex::mydouble md ;
ClassOfEverything::sizeType st ;
ClassOfEverything::mydouble md ;
MyTemplate< double , int , short >::template_int my_template_var_int ;
int invisible_int ;
@ -450,8 +439,8 @@ class Ball_alex : public Ball {
std::list < std::string > ls ;
private:
Ball_alex (const Ball_alex &);
Ball_alex & operator= (const Ball_alex &);
ClassOfEverything (const ClassOfEverything &);
ClassOfEverything & operator= (const ClassOfEverything &);
};
@ -466,7 +455,7 @@ typedef struct test_struct {
} TEST_STRUCT ;
#ifdef SWIG
%struct_str(Ball_alex)
%struct_str(ClassOfEverything)
#endif
namespace my_ns {
@ -492,6 +481,7 @@ class Test {
class Abstract {
public:
Abstract( int in_id ) : id(in_id) {} ;
virtual ~Abstract() {} ;
int id ;
virtual void speak() = 0 ;
} ;

View File

@ -3,20 +3,7 @@
@verbatim
PURPOSE:
(Ball model EOM state parameter definition.)
REFERENCES:
(((Bailey, R.W, and Paddock, E.J.)
(Trick Simulation Environment) (NASA:JSC #37943)
(JSC/Engineering Directorate/Automation, Robotics and Simulation Division)
(March 1997)))
ASSUMPTIONS AND LIMITATIONS:
((2 dimensional space)
(Translational EOM only))
LIBRARY DEPENDENCY:
((Ball_test.o))
PROGRAMMERS:
(((Robert W. Bailey) (Sweet Systems Inc) (March 1997) (Tutorial Lesson 1))
((Edwin Z. Crues)(Titan Systems Corp.)(Jan 2002)(Crude C++ translation)))
(Namespace input processor tests)
@endverbatim
*******************************************************************************/

View File

@ -0,0 +1,24 @@
/**
@file
@verbatim
PURPOSE:
(ICG test)
ICG: (No)
LIBRARY DEPENDENCY:
()
@endverbatim
*******************************************************************************/
#ifndef NOICG_HH
#define NOICG_HH
class DoNotICG {
public:
int ii ;
} ;
#endif /* _BALL_HH_ */

View File

@ -3,20 +3,7 @@
@verbatim
PURPOSE:
(Ball model EOM state parameter definition.)
REFERENCES:
(((Bailey, R.W, and Paddock, E.J.)
(Trick Simulation Environment) (NASA:JSC #37943)
(JSC/Engineering Directorate/Automation, Robotics and Simulation Division)
(March 1997)))
ASSUMPTIONS AND LIMITATIONS:
((2 dimensional space)
(Translational EOM only))
LIBRARY DEPENDENCY:
()
PROGRAMMERS:
(((Robert W. Bailey) (Sweet Systems Inc) (March 1997) (Tutorial Lesson 1))
((Edwin Z. Crues)(Titan Systems Corp.)(Jan 2002)(Crude C++ translation)))
(Template tests)
@endverbatim
*******************************************************************************/

View File

@ -0,0 +1,21 @@
#include "test_ip/include/ClassOfEverything.hh"
double ClassOfEverything::sdaa[3][3] ;
const double ClassOfEverything::scd = 1.2345 ;
const double ClassOfEverything::csd = 6.7890 ;
const double ClassOfEverything::sdc = 9.8765 ;
ClassOfEverything::ClassOfEverything() : cir(i), icr(i) {
unsigned int ii ;
ep = NULL ;
epp = NULL ;
for ( ii = 0 ; ii < 4 ; ii++ ) {
eap[ii] = NULL ;
}
}

View File

@ -1,35 +0,0 @@
/**
@file
@verbatim
PURPOSE:
(Ball model EOM state parameter definition.)
ICG: (No)
REFERENCES:
(((Bailey, R.W, and Paddock, E.J.)
(Trick Simulation Environment) (NASA:JSC #37943)
(JSC/Engineering Directorate/Automation, Robotics and Simulation Division)
(March 1997)))
ASSUMPTIONS AND LIMITATIONS:
((2 dimensional space)
(Translational EOM only))
LIBRARY DEPENDENCY:
()
PROGRAMMERS:
(((Robert W. Bailey) (Sweet Systems Inc) (March 1997) (Tutorial Lesson 1))
((Edwin Z. Crues)(Titan Systems Corp.)(Jan 2002)(Crude C++ translation)))
@endverbatim
*******************************************************************************/
#ifndef NOICG_HH
#define NOICG_HH
class DoNotICG {
public:
int ii ;
} ;
#endif /* _BALL_HH_ */

View File

@ -1,21 +0,0 @@
#include "test_ip/include/Ball_test.hh"
double Ball_alex::sdaa[3][3] ;
const double Ball_alex::scd = 1.2345 ;
const double Ball_alex::csd = 6.7890 ;
const double Ball_alex::sdc = 9.8765 ;
Ball_alex::Ball_alex() : cir(i), icr(i) {
unsigned int ii ;
ep = NULL ;
epp = NULL ;
for ( ii = 0 ; ii < 4 ; ii++ ) {
eap[ii] = NULL ;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,100 +0,0 @@
/************************TRICK HEADER*************************
PURPOSE:
(This comment lists out the other object files that are not included from c++ headers)
LIBRARY DEPENDENCIES:
(
)
*************************************************************/
#include "sim_objects/default_trick_sys.sm"
##include "test_ip/include/Ball_test.hh"
/* base ball... get it? :) */
class ballSimObject : public Trick::SimObject {
public:
Ball_alex obj ;
TEST_STRUCT t ;
my_ns::AA ns_test ;
ballSimObject() {
("default_data") obj.force.default_data() ;
("default_data") obj.state.default_data() ;
("initialization") obj.state_init() ;
("derivative") obj.force_field() ;
("derivative") obj.state_deriv() ;
("integration") trick_ret = obj.state_integ() ;
(10.0, "scheduled") trick_ret = obj.state_print() ;
("freeze") obj.state_print() ;
}
private:
ballSimObject (const ballSimObject &);
ballSimObject & operator= (const ballSimObject &);
} ;
class disabledSimObject : public Trick::SimObject {
public:
void print_me() {
message_publish( 7 , "\033[31mThis statement in disabledSimObject should not print because the sim object is disabled!!!\033[0m\n" ) ;
add_test_result( "IPtest" , "Disable sim_object" , "job not disabled\n") ;
}
disabledSimObject() {
("initialization") print_me() ;
(10.0 , "scheduled") print_me() ;
}
} ;
class emptySimObject : public Trick::SimObject {
public:
Ball_alex obj ;
private:
emptySimObject (const emptySimObject &);
emptySimObject & operator= (const emptySimObject &);
} ;
class reallyemptySimObject : public Trick::SimObject {
public:
int ii ;
} ;
class plainClass {
public:
double d ;
float f ;
plainClass() : d() , f() {} ;
}
// Instantiations
ballSimObject ball ;
disabledSimObject disabled_obj ;
// This collect can now be done in create_connections or the input file.
//collect ball.obj.state.work.external_force = {ball.obj.force.output.force[0]};
IntegLoop my_integ_loop (0.01) ball;
// Connect objects
void create_connections() {
// Set the default termination time
trick_sys.sched.set_terminate_time(300.0) ;
trick_sys.sched.set_freeze_frame(0.10) ;
my_integ_loop.getIntegrator( Runge_Kutta_2, 4 );
// Example of adding a collect in create_connections.
ball.obj.state.add_external_force( ball.obj.force.output.force ) ;
}

View File

@ -1,4 +0,0 @@
TRICK_ICG_EXCLUDE=${TRICK_HOME}/trick_models/exclude_me
TRICK_CFLAGS += -I${TRICK_HOME}/trick_models
TRICK_CXXFLAGS += -I${TRICK_HOME}/trick_models

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +0,0 @@
TRICK_ICG_EXCLUDE=${TRICK_HOME}/trick_models/exclude_me
TRICK_CFLAGS += -I${TRICK_HOME}/trick_models
TRICK_CXXFLAGS += -I${TRICK_HOME}/trick_models
#TRICK_CONVERT_SWIG_FLAGS += -s

View File

@ -1,4 +0,0 @@
TRICK_CFLAGS += -I${TRICK_HOME}/trick_models
TRICK_CXXFLAGS += -I${TRICK_HOME}/trick_models

View File

@ -19,7 +19,6 @@ COMPILE_DIRS = SIM_Ball++_L1 \
SIM_demo_sdefine \
SIM_events \
SIM_monte \
SIM_rti \
SIM_satellite \
SIM_stls \
SIM_stls2 \
@ -30,11 +29,9 @@ COMPILE_DIRS = SIM_Ball++_L1 \
SIM_test_dp \
SIM_test_dr \
SIM_test_inherit \
SIM_test_ip \
SIM_test_ip2 \
SIM_test_sched \
SIM_test_simlib \
SIM_test_templates \
SIM_threads \
SIM_threads_simple \
SIM_trickcomm
@ -59,17 +56,14 @@ TEST_DIRS = SIM_Ball++_L1 \
SIM_demo_sdefine \
SIM_events \
SIM_monte \
SIM_rti \
SIM_stls \
SIM_stls2 \
SIM_sun \
SIM_target \
SIM_test_dp \
SIM_test_dr \
SIM_test_ip \
SIM_test_sched \
SIM_test_simlib \
SIM_test_templates \
SIM_threads
# This test is temporarily sitting out until fixed.