tests: allow common_cli.c with logging enabled

common_cli.c disables logging by default so stdio is usable as vty
without log messages getting strewn inbetween.  This the right thing for
most tests, but not all; sometimes we do want log messages.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2021-11-07 15:49:17 +01:00
parent faf079ff7e
commit 865dd9fe0b
2 changed files with 4 additions and 1 deletions

View File

@ -60,6 +60,7 @@ static void vty_do_exit(int isexit)
}
const struct frr_yang_module_info *const *test_yang_modules = NULL;
int test_log_prio = ZLOG_DISABLED;
/* main routine. */
int main(int argc, char **argv)
@ -73,7 +74,7 @@ int main(int argc, char **argv)
/* master init. */
master = thread_master_create(NULL);
zlog_aux_init("NONE: ", ZLOG_DISABLED);
zlog_aux_init("NONE: ", test_log_prio);
/* Library inits. */
cmd_init(1);

View File

@ -37,6 +37,8 @@ extern void test_init(int argc, char **argv);
*/
extern struct thread_master *master;
extern int test_log_prio;
extern int dump_args(struct vty *vty, const char *descr, int argc,
struct cmd_token *argv[]);