From ce422e16d9bb5a1be639d6fc10bd03ebef03cad1 Mon Sep 17 00:00:00 2001 From: bel Date: Sat, 18 Jul 2015 23:31:49 +0200 Subject: [PATCH] Split tests between HTTP and HTTPS, so it is clear which one failed --- test/CMakeLists.txt | 3 ++- test/public.c | 13 ++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6018a233..c2da616c 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -94,7 +94,8 @@ endmacro(civetweb_add_test) # Public API tests civetweb_add_test(Public "Cookies") -civetweb_add_test(Public "Start Stop Server") +civetweb_add_test(Public "Start Stop HTTP Server") +civetweb_add_test(Public "Start Stop HTTPS Server") # Private API tests civetweb_add_test(Private "HTTP Message") diff --git a/test/public.c b/test/public.c index 576c2e2a..6f9763ee 100644 --- a/test/public.c +++ b/test/public.c @@ -78,7 +78,7 @@ START_TEST (test_mg_start_stop_https_server) struct mg_context *ctx; const char *OPTIONS[] = { "document_root", ".", - "listening_ports", "8080", + "listening_ports", "8080,8443s", "ssl_certificate", "../resources/ssl_cert.pem", NULL, }; @@ -95,14 +95,17 @@ Suite * make_public_suite (void) { Suite * const suite = suite_create("Public"); TCase * const cookies = tcase_create("Cookies"); - TCase * const startstop = tcase_create("Start Stop Server"); + TCase * const startstophttp = tcase_create("Start Stop HTTP Server"); + TCase * const startstophttps = tcase_create("Start Stop HTTPS Server"); tcase_add_test(cookies, test_mg_get_cookie); suite_add_tcase(suite, cookies); - tcase_add_test(startstop, test_mg_start_stop_http_server); - tcase_add_test(startstop, test_mg_start_stop_https_server); - suite_add_tcase(suite, startstop); + tcase_add_test(startstophttp, test_mg_start_stop_http_server); + suite_add_tcase(suite, startstophttp); + + tcase_add_test(startstophttps, test_mg_start_stop_https_server); + suite_add_tcase(suite, startstophttps); return suite; }