mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +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>
(cherry picked from commit 6dbcc21921)
This commit is contained in:
committed by
Andreas Schneider
parent
d46f01cb7c
commit
3191c1f6be
@@ -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