Skip to content

Commit 07839e4

Browse files
committed
tests: raise log level to Debug for corba tests and set log level before __os_init (temporarily)
The rtt typekit and plugins are already loaded by an InitFunction in rtt/plugin/PluginLoader.cpp.
1 parent 63d0e07 commit 07839e4

File tree

4 files changed

+22
-13
lines changed

4 files changed

+22
-13
lines changed

tests/corba_ipc_server.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,15 @@ int ORO_main(int argc, char** argv)
128128
#endif
129129
corba::TaskContextProxy::InitOrb(argc,argv);
130130

131-
PluginLoader::Instance()->loadTypekits("../rtt");
131+
// disable logging of errors or warnings if no ORO_LOGLEVEL was set.
132+
if ( log().getLogLevel() == Logger::Warning ) {
133+
// log(Info) << "Lowering LogLevel to Critical." << endlog();
134+
// log().setLogLevel(Logger::Critical);
135+
log().setLogLevel(Logger::Debug);
136+
log(Info) << "Setting LogLevel to Debug." << endlog();
137+
} else {
138+
log(Info) << "LogLevel unaltered by test-runner." << endlog();
139+
}
132140

133141
#ifndef WIN32
134142
pid_t pid = getpid();

tests/corba_mqueue_ipc_server.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ int ORO_main(int argc, char** argv)
8282
#endif
8383
corba::TaskContextProxy::InitOrb(argc,argv);
8484

85-
PluginLoader::Instance()->loadTypekits("../rtt");
86-
8785
#ifndef WIN32
8886
pid_t pid = getpid();
8987
std::ofstream pidfile("corba-mqueue-ipc-server.pid");

tests/test-runner-corba.cpp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,22 +84,24 @@ boost::unit_test::test_suite* init_unit_test_suite(int argc, char** const argv)
8484
assert((size_t)-1 != freeMem); // increase MEMORY_SIZE above most likely, as TLSF has a several kilobyte overhead
8585
(void)freeMem; // avoid compiler warning
8686
#endif
87-
__os_init(argc, argv);
88-
89-
boost::unit_test::unit_test_monitor.register_exception_translator<CORBA::Exception>(&translate_corba_exception);
90-
91-
corba::TaskContextServer::InitOrb(argc,argv);
92-
corba::TaskContextServer::ThreadOrb();
93-
9487

9588
// disable logging of errors or warnings if no ORO_LOGLEVEL was set.
9689
if ( log().getLogLevel() == Logger::Warning ) {
97-
log(Info) << "Lowering LogLevel to Critical." << endlog();
98-
log().setLogLevel(Logger::Critical);
90+
// log(Info) << "Lowering LogLevel to Critical." << endlog();
91+
// log().setLogLevel(Logger::Critical);
92+
log().setLogLevel(Logger::Debug);
93+
log(Info) << "Setting LogLevel to Debug." << endlog();
9994
} else {
10095
log(Info) << "LogLevel unaltered by test-runner." << endlog();
10196
}
10297

98+
__os_init(argc, argv);
99+
100+
boost::unit_test::unit_test_monitor.register_exception_translator<CORBA::Exception>(&translate_corba_exception);
101+
102+
corba::TaskContextServer::InitOrb(argc,argv);
103+
corba::TaskContextServer::ThreadOrb();
104+
103105
return 0;
104106
}
105107

tests/test-runner.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ boost::unit_test::test_suite* init_unit_test_suite(int argc, char** const argv)
8383
assert((size_t)-1 != freeMem); // increase MEMORY_SIZE above most likely, as TLSF has a several kilobyte overhead
8484
(void)freeMem; // avoid compiler warning
8585
#endif
86-
__os_init(argc, argv);
8786

8887
// disable logging of errors or warnings if no ORO_LOGLEVEL was set.
8988
if ( log().getLogLevel() == Logger::Warning ) {
@@ -93,6 +92,8 @@ boost::unit_test::test_suite* init_unit_test_suite(int argc, char** const argv)
9392
log(Info) << "LogLevel unaltered by test-runner." << endlog();
9493
}
9594

95+
__os_init(argc, argv);
96+
9697
return 0;
9798
}
9899

0 commit comments

Comments
 (0)