summaryrefslogtreecommitdiffstats
path: root/test/dtlstest.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/dtlstest.c')
-rw-r--r--test/dtlstest.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/test/dtlstest.c b/test/dtlstest.c
index b766802148..1bf173509e 100644
--- a/test/dtlstest.c
+++ b/test/dtlstest.c
@@ -93,22 +93,18 @@ static int test_dtls_unprocessed(int testidx)
return testresult;
}
-int test_main(int argc, char *argv[])
+int setup_tests(void)
{
- int testresult = 1;
-
- if (!TEST_int_eq(argc, 3))
- return 1;
-
- cert = argv[1];
- privkey = argv[2];
+ if (!TEST_ptr(cert = test_get_argument(0))
+ || !TEST_ptr(privkey = test_get_argument(1)))
+ return 0;
ADD_ALL_TESTS(test_dtls_unprocessed, NUM_TESTS);
+ return 1;
+}
- testresult = run_tests(argv[0]);
-
+void cleanup_tests(void)
+{
bio_f_tls_dump_filter_free();
bio_s_mempacket_test_free();
-
- return testresult;
}