Skip to content

Commit 05186ea

Browse files
committed
Allow setting an IP address for the primary client test
1 parent e479418 commit 05186ea

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_primary_client.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,14 @@ TEST_F(PrimaryClientTest, test_uninitialized_primary_client)
112112
int main(int argc, char* argv[])
113113
{
114114
::testing::InitGoogleTest(&argc, argv);
115+
for (int i = 0; i < argc; i++)
116+
{
117+
if (std::string(argv[i]) == "--robot_ip" && i + 1 < argc)
118+
{
119+
g_ROBOT_IP = argv[i + 1];
120+
break;
121+
}
122+
}
115123

116124
return RUN_ALL_TESTS();
117125
}

0 commit comments

Comments
 (0)