diff --git a/tracetools_test/src/test_ping.cpp b/tracetools_test/src/test_ping.cpp index 5a1cafa..86b203f 100644 --- a/tracetools_test/src/test_ping.cpp +++ b/tracetools_test/src/test_ping.cpp @@ -69,7 +69,14 @@ 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..a6a4663 100644 --- a/tracetools_test/src/test_pong.cpp +++ b/tracetools_test/src/test_pong.cpp @@ -58,7 +58,14 @@ 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);