Skip to content

Commit ea429d4

Browse files
committed
Better logging for P2P tests
P4:8088395
1 parent ae2ef79 commit ea429d4

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tests/test_p2p.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ int main( int argc, const char **argv )
181181
g_eTestRole = k_ETestRole_Server;
182182
else if ( !strcmp( pszSwitch, "--symmetric" ) )
183183
g_eTestRole = k_ETestRole_Symmetric;
184+
else if ( !strcmp( pszSwitch, "--log" ) )
185+
{
186+
const char *pszArg = GetArg();
187+
TEST_InitLog( pszArg );
188+
}
184189
else
185190
TEST_Fatal( "Unexpected command line argument '%s'", pszSwitch );
186191
}
@@ -224,7 +229,7 @@ int main( int argc, const char **argv )
224229
SteamNetworkingUtils()->SetGlobalCallback_SteamNetConnectionStatusChanged( OnSteamNetConnectionStatusChanged );
225230

226231
// Comment this line in for more detailed spew about signals, route finding, ICE, etc
227-
//SteamNetworkingUtils()->SetGlobalConfigValueInt32( k_ESteamNetworkingConfig_LogLevel_P2PRendezvous, k_ESteamNetworkingSocketsDebugOutputType_Verbose );
232+
SteamNetworkingUtils()->SetGlobalConfigValueInt32( k_ESteamNetworkingConfig_LogLevel_P2PRendezvous, k_ESteamNetworkingSocketsDebugOutputType_Verbose );
228233

229234
// Create listen socket to receive connections on, unless we are the client
230235
if ( g_eTestRole == k_ETestRole_Server )

tests/test_p2p.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ def StartClientInThread( role, local, remote ):
8383
"--" + role,
8484
"--identity-local", "str:"+local,
8585
"--identity-remote", "str:"+remote,
86-
"--signaling-server", "localhost:10000"
86+
"--signaling-server", "localhost:10000",
87+
"--log", local + ".verbose.log"
8788
]
8889

8990
env = dict( os.environ )

0 commit comments

Comments
 (0)