mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 02:38:09 +09:00
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>
This commit is contained in:
committed by
Andreas Schneider
parent
2eccd04ff6
commit
6dbcc21921
@@ -33,6 +33,7 @@ extern LIBSSH_THREAD int ssh_log_level;
|
|||||||
static int setup_config_files(void **state)
|
static int setup_config_files(void **state)
|
||||||
{
|
{
|
||||||
ssh_session session;
|
ssh_session session;
|
||||||
|
int verbosity;
|
||||||
|
|
||||||
unlink(LIBSSH_TESTCONFIG1);
|
unlink(LIBSSH_TESTCONFIG1);
|
||||||
unlink(LIBSSH_TESTCONFIG2);
|
unlink(LIBSSH_TESTCONFIG2);
|
||||||
@@ -106,6 +107,10 @@ static int setup_config_files(void **state)
|
|||||||
"");
|
"");
|
||||||
|
|
||||||
session = ssh_new();
|
session = ssh_new();
|
||||||
|
|
||||||
|
verbosity = torture_libssh_verbosity();
|
||||||
|
ssh_options_set(session, SSH_OPTIONS_LOG_VERBOSITY, &verbosity);
|
||||||
|
|
||||||
*state = session;
|
*state = session;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -15,7 +15,14 @@
|
|||||||
|
|
||||||
static int setup(void **state)
|
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;
|
*state = session;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user