aboutsummaryrefslogtreecommitdiff
path: root/tests/unittests
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2017-07-14 08:52:08 +0200
committerAndreas Schneider <asn@cryptomilk.org>2017-07-14 08:52:08 +0200
commitc480ac852283370a8d2229c81e8f412b51b2dd23 (patch)
treea00a861ec5eba5e66da556566d0ec724f0f53f93 /tests/unittests
parenta89a67e0085acd19219d80805770149eb7282615 (diff)
downloadlibssh-c480ac852283370a8d2229c81e8f412b51b2dd23.tar.gz
libssh-c480ac852283370a8d2229c81e8f412b51b2dd23.tar.xz
libssh-c480ac852283370a8d2229c81e8f412b51b2dd23.zip
tests: Only run ssh_bind test if we build with server support
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'tests/unittests')
-rw-r--r--tests/unittests/torture_options.c6
1 files changed, 6 insertions, 0 deletions
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;
}