Skip to content

Commit e77e76f

Browse files
committed
Merge branch 'tkt-flow-94_should-log-perf' of github.com:Flow-IPC/ipc into tkt-flow-94_should-log-perf
2 parents 73f9a5e + 7ae3869 commit e77e76f

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

test/suite/unit_test/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ set(isal_root ${FLOW_LIKE_META_ROOT_ipc_shm_arena_lend}/src)
6565

6666
set(SRCS
6767
${FLOW_LIKE_META_ROOT_flow}/src/flow/test/test_common_util.cpp
68-
${FLOW_LIKE_META_ROOT_flow}/src/flow/test/test_config.cpp
6968
${FLOW_LIKE_META_ROOT_flow}/src/flow/test/test_file_util.cpp
7069
${FLOW_LIKE_META_ROOT_ipc_core}/src/ipc/test/test_common_util.cpp
7170
${isal_root}/ipc/session/standalone/shm/arena_lend/jemalloc/test/shm_session_test.cpp
@@ -106,7 +105,6 @@ handle_binary(libipc_unit_test.exec)
106105

107106
set(SRCS
108107
${FLOW_LIKE_META_ROOT_flow}/src/flow/test/test_common_util.cpp
109-
${FLOW_LIKE_META_ROOT_flow}/src/flow/test/test_config.cpp
110108
${isal_root}/ipc/shm/arena_lend/test/test_borrower.cpp
111109
test_borrower_main.cpp)
112110
unset(CAPNP_SCHEMAS)

test/suite/unit_test/test_borrower_main.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,10 @@ static int parse_and_execute(int argc, char** argv)
7575
Test_config::get_singleton(); // Touching it just below.
7676

7777
po::options_description cmd_line_opts("unit test options");
78+
const string HELP_PARAM = "help";
7879
cmd_line_opts.add_options()
79-
((Test_config::S_HELP_PARAM + ",h").c_str(), "help")
80-
((Test_config::S_LOG_SEVERITY_PARAM + ",l").c_str(), po::value<flow::log::Sev>(&Test_config::get_singleton().m_sev),
80+
((HELP_PARAM + ",h").c_str(), "help")
81+
("min-log-severity,l", po::value<flow::log::Sev>(&Test_config::get_singleton().m_sev),
8182
"minimum log severity")
8283
((Test_borrower::S_SHM_POOL_COLLECTION_ID_PARAM + ",c").c_str(),
8384
po::value<Collection_id>(&shm_pool_collection_id),
@@ -95,7 +96,7 @@ static int parse_and_execute(int argc, char** argv)
9596
po::store(cmd_line_parsed_opts, vm);
9697
po::notify(vm);
9798

98-
if (vm.count(Test_config::S_HELP_PARAM) > 0)
99+
if (vm.count(HELP_PARAM) > 0)
99100
{
100101
cout << cmd_line_opts << "\n";
101102
return static_cast<int>(Status_code::S_HELP);

test/suite/unit_test/test_main.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,13 @@ int configure_logging(int argc, char* argv[])
7676
Test_config::get_singleton(); // Touching it just below.
7777

7878
po::options_description cmd_line_opts("unit test options");
79+
const string HELP_PARAM = "help";
7980
cmd_line_opts.add_options()
80-
((Test_config::S_HELP_PARAM + ",h").c_str(), "help")
81-
((Test_config::S_LOG_SEVERITY_PARAM + ",l").c_str(), po::value<flow::log::Sev>(&Test_config::get_singleton().m_sev),
82-
"minimum log severity");
81+
((HELP_PARAM + ",h").c_str(), "help")
82+
("min-log-severity,l", po::value<flow::log::Sev>(&Test_config::get_singleton().m_sev),
83+
"minimum log severity")
84+
("do-not-fail-benchmarks", po::bool_switch(&Test_config::get_singleton().m_do_not_fail_benchmarks),
85+
"sensitive (not necessarily all) benchmarks may be performed but won't cause failure.");
8386

8487
try
8588
{
@@ -88,7 +91,7 @@ int configure_logging(int argc, char* argv[])
8891
po::store(cmd_line_parsed_opts, vm);
8992
po::notify(vm);
9093

91-
if (vm.count(Test_config::S_HELP_PARAM) > 0)
94+
if (vm.count(HELP_PARAM) > 0)
9295
{
9396
cout << cmd_line_opts << "\n";
9497
return 1;

0 commit comments

Comments
 (0)