From c480ac852283370a8d2229c81e8f412b51b2dd23 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 14 Jul 2017 08:52:08 +0200 Subject: [PATCH] tests: Only run ssh_bind test if we build with server support Signed-off-by: Andreas Schneider --- tests/unittests/torture_options.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/unittests/torture_options.c b/tests/unittests/torture_options.c index 820e607d..d6d2b6a6 100644 --- a/tests/unittests/torture_options.c +++ b/tests/unittests/torture_options.c @@ -200,6 +200,7 @@ static void torture_options_proxycommand(void **state) { } +#ifdef WITH_SERVER /* sshbind options */ static int sshbind_setup(void **state) { @@ -213,6 +214,7 @@ static int sshbind_teardown(void **state) ssh_bind_free(*state); return 0; } +#endif /* WITH_SERVER */ static void torture_bind_options_import_key(void **state) { @@ -261,14 +263,18 @@ int torture_run_tests(void) { cmocka_unit_test_setup_teardown(torture_options_proxycommand, setup, teardown), }; +#ifdef WITH_SERVER struct CMUnitTest sshbind_tests[] = { cmocka_unit_test_setup_teardown(torture_bind_options_import_key, sshbind_setup, sshbind_teardown), }; +#endif /* WITH_SERVER */ ssh_init(); torture_filter_tests(tests); rc = cmocka_run_group_tests(tests, NULL, NULL); +#ifdef WITH_SERVER rc += cmocka_run_group_tests(sshbind_tests, NULL, NULL); +#endif /* WITH_SERVER */ ssh_finalize(); return rc; }