diff --git a/tests/session_fixture.c b/tests/session_fixture.c index 4997d4ab..2ae92ec1 100644 --- a/tests/session_fixture.c +++ b/tests/session_fixture.c @@ -141,14 +141,20 @@ LIBSSH2_SESSION *start_session_fixture(int *skipped) } connected_session = libssh2_session_init_ex(NULL, NULL, NULL, NULL); - if(getenv("FIXTURE_TRACE_ALL")) { - libssh2_trace(connected_session, ~0); - } if(!connected_session) { fprintf(stderr, "libssh2_session_init_ex failed\n"); return NULL; } + if(getenv("FIXTURE_TRACE_ALL_CONNECT")) { + libssh2_trace(connected_session, ~0); + fprintf(stdout, "Trace all enabled for connect_to_server.\n"); + } + else if(getenv("FIXTURE_TRACE_ALL")) { + libssh2_trace(connected_session, ~0); + fprintf(stdout, "Trace all enabled.\n"); + } + /* Override crypt algorithm for the test */ if(crypt) { if(libssh2_session_method_pref(connected_session, @@ -180,6 +186,10 @@ LIBSSH2_SESSION *start_session_fixture(int *skipped) return NULL; } + if(getenv("FIXTURE_TRACE_ALL_CONNECT")) { + libssh2_trace(connected_session, 0); + } + return connected_session; }