tests: Use global verbosity in tests
This allows adjusting the log level of config and options tests using environment variable LIBSSH_VERBOSITY as it works in most of the other tests. Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
родитель
2eccd04ff6
Коммит
6dbcc21921
@ -33,6 +33,7 @@ extern LIBSSH_THREAD int ssh_log_level;
|
||||
static int setup_config_files(void **state)
|
||||
{
|
||||
ssh_session session;
|
||||
int verbosity;
|
||||
|
||||
unlink(LIBSSH_TESTCONFIG1);
|
||||
unlink(LIBSSH_TESTCONFIG2);
|
||||
@ -106,6 +107,10 @@ static int setup_config_files(void **state)
|
||||
"");
|
||||
|
||||
session = ssh_new();
|
||||
|
||||
verbosity = torture_libssh_verbosity();
|
||||
ssh_options_set(session, SSH_OPTIONS_LOG_VERBOSITY, &verbosity);
|
||||
|
||||
*state = session;
|
||||
|
||||
return 0;
|
||||
|
@ -15,7 +15,14 @@
|
||||
|
||||
static int setup(void **state)
|
||||
{
|
||||
ssh_session session = ssh_new();
|
||||
ssh_session session;
|
||||
int verbosity;
|
||||
|
||||
session = ssh_new();
|
||||
|
||||
verbosity = torture_libssh_verbosity();
|
||||
ssh_options_set(session, SSH_OPTIONS_LOG_VERBOSITY, &verbosity);
|
||||
|
||||
*state = session;
|
||||
|
||||
return 0;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user