diff --git a/tracetools_test/src/test_ping.cpp b/tracetools_test/src/test_ping.cpp index 5a1cafa..b419e72 100644 --- a/tracetools_test/src/test_ping.cpp +++ b/tracetools_test/src/test_ping.cpp @@ -69,7 +69,12 @@ private: int main(int argc, char * argv[]) { - bool do_only_one = argc == 1; + bool do_only_one = true; + for (int i = 0; i < argc; ++i) { + if (strncmp(argv[i], "do_more", 7) == 0) { + do_only_one = false; + } + } rclcpp::init(argc, argv); diff --git a/tracetools_test/src/test_pong.cpp b/tracetools_test/src/test_pong.cpp index f1d52b8..9e8167c 100644 --- a/tracetools_test/src/test_pong.cpp +++ b/tracetools_test/src/test_pong.cpp @@ -58,7 +58,12 @@ private: int main(int argc, char * argv[]) { - bool do_only_one = argc == 1; + bool do_only_one = true; + for (int i = 0; i < argc; ++i) { + if (strncmp(argv[i], "do_more", 7) == 0) { + do_only_one = false; + } + } rclcpp::init(argc, argv);