Hi,
I
am presently developing a tool to execute a set of test cases after specified
time duration (let's say a monitoring tool).
Following
is the sample code I have written:
bool init_test()
{
boost::unit_test::test_suite* ts1 = BOOST_TEST_SUITE( "test_suite1"
);
return false;
}
TestSuite* testSuite
= new TestSuite("TestSuite1");
//TestSuite Class is derived from
boost::unit_test::test_suite
if (!testSuite->initialize())
{
LOG(SDK_ERROR, "Failed to initialize
testSuite");
return false;
}
ts1->add(testSuite);
::boost::framework::master_test_suite().add(ts1);
return true;
}
int main(int argc, char *argv[])
{
while (1)
{
boost::unit_test::unit_test_main(&init_test, argc, argv);
::Sleep(2*60*1000); //wait for 2 mins
}
}
It
works fine on first attempt. However, on second term after ::Sleep() is over
and program try to register &init_test I get following ERROR:
Fail to process runtime parameters: Definition of parameter
auto_start_dbg conflicts with defintion of parameter auto_start_dbg
Usage:
MarketDataCheck.exe [{--auto_start_dbg=|-d }[yes|y|no|n]]
[--break_exec_path=<value>] [{--build_info=|-i }[yes|y|no|n]] [{--catch_system_errors=|-s
}[
yes|y|no|n]] [--detect_fp_exceptions=[yes|y|no|n]]
[--detect_memory_leaks=<value>] [{--log_format=|-f }<value>]
[{--log_level=|-l }<value>] [{--output
_format=|-o }<value>] [{--random=|-a }[<value>]]
[{--report_format=|-m }<value>] [{--report_level=|-r }<value>]
[{--result_code=|-c }[yes|y|no|n]] [{-
-run_test=|-t }<value>] [--save_pattern=[yes|y|no|n]]
[{--show_progress=|-p }[yes|y|no|n]] [--use_alt_stack=[yes|y|no|n]]
[{--help=|-? }[yes|y|no|n]]
Would
you please provide the reason for this error??
If
I am not using Boost.Test in correct manner, please suggest any alternative way
to use same Boost.Test in iteration mode.
(Let
me know in case more info is required to debug this problem)
Thank
You,
Gaurav