summaryrefslogtreecommitdiffstats
path: root/tests/client/torture_proxycommand.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2015-09-07 10:39:51 +0200
committerAndreas Schneider <asn@cryptomilk.org>2015-09-07 10:40:12 +0200
commit82a80b205bb5159c3e8da635c47882a14c17120b (patch)
tree9e00b3d674276c9a227f167b4b4712db912a5b96 /tests/client/torture_proxycommand.c
parent5b586fdfecbe12f3f8e69099d809ca96c7cb978e (diff)
downloadlibssh-82a80b205bb5159c3e8da635c47882a14c17120b.tar.gz
libssh-82a80b205bb5159c3e8da635c47882a14c17120b.tar.xz
libssh-82a80b205bb5159c3e8da635c47882a14c17120b.zip
tests: Migrate to new cmocka API
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'tests/client/torture_proxycommand.c')
-rw-r--r--tests/client/torture_proxycommand.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/client/torture_proxycommand.c b/tests/client/torture_proxycommand.c
index a1508811..5167f492 100644
--- a/tests/client/torture_proxycommand.c
+++ b/tests/client/torture_proxycommand.c
@@ -4,14 +4,18 @@
#include <libssh/libssh.h>
#include "libssh/priv.h"
-static void setup(void **state) {
+static int setup(void **state) {
ssh_session session = ssh_new();
*state = session;
+
+ return 0;
}
-static void teardown(void **state) {
+static int teardown(void **state) {
ssh_free(*state);
+
+ return 0;
}
static void torture_options_set_proxycommand(void **state) {
@@ -42,16 +46,16 @@ static void torture_options_set_proxycommand_notexist(void **state) {
int torture_run_tests(void) {
int rc;
- UnitTest tests[] = {
- unit_test_setup_teardown(torture_options_set_proxycommand, setup, teardown),
- unit_test_setup_teardown(torture_options_set_proxycommand_notexist, setup, teardown),
+ struct CMUnitTest tests[] = {
+ cmocka_unit_test_setup_teardown(torture_options_set_proxycommand, setup, teardown),
+ cmocka_unit_test_setup_teardown(torture_options_set_proxycommand_notexist, setup, teardown),
};
ssh_init();
torture_filter_tests(tests);
- rc = run_tests(tests);
+ rc = cmocka_run_group_tests(tests, NULL, NULL);
ssh_finalize();
return rc;