libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 4b3c7d9e4251baa4812255f388b4b3d51b78a84b
parent 9d1596d3108ff237dbe368942296a0f6fbba47f8
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Sun, 25 Jun 2017 22:31:35 +0300

test_shutdown_select/test_shutdown_poll: conditionally use test_shutdown_*_ignore to avoid XFAIL results

Diffstat:
Msrc/microhttpd/Makefile.am | 28++++++++++++++++++++++++----
Msrc/microhttpd/test_shutdown_select.c | 4+++-
2 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am @@ -144,8 +144,6 @@ check_PROGRAMS = \ test_str_to_value \ test_str_token \ test_http_reasons \ - test_shutdown_select \ - test_shutdown_poll \ test_daemon if HAVE_POSIX_THREADS @@ -166,10 +164,14 @@ endif TESTS = $(check_PROGRAMS) -if !HAVE_LISTEN_SHUTDOWN -XFAIL_TESTS = \ +if HAVE_LISTEN_SHUTDOWN +check_PROGRAMS += \ test_shutdown_select \ test_shutdown_poll +else +check_PROGRAMS += \ + test_shutdown_select_ignore \ + test_shutdown_poll_ignore endif test_daemon_SOURCES = \ @@ -246,6 +248,24 @@ test_shutdown_poll_LDADD = \ $(PTHREAD_LIBS) endif +test_shutdown_select_ignore_SOURCES = \ + test_shutdown_select.c +if USE_POSIX_THREADS +test_shutdown_select_ignore_CFLAGS = \ + $(AM_CFLAGS) $(PTHREAD_CFLAGS) +test_shutdown_select_ignore_LDADD = \ + $(PTHREAD_LIBS) +endif + +test_shutdown_poll_ignore_SOURCES = \ + test_shutdown_select.c mhd_threads.h +if USE_POSIX_THREADS +test_shutdown_poll_ignore_CFLAGS = \ + $(AM_CFLAGS) $(PTHREAD_CFLAGS) +test_shutdown_poll_ignore_LDADD = \ + $(PTHREAD_LIBS) +endif + test_str_compare_SOURCES = \ test_str.c test_helpers.h mhd_str.c diff --git a/src/microhttpd/test_shutdown_select.c b/src/microhttpd/test_shutdown_select.c @@ -285,8 +285,10 @@ main (int argc, char *const *argv) int err; #endif /* MHD_WINSOCK_SOCKETS */ bool test_poll; + bool must_ignore; test_poll = has_in_name(argv[0], "_poll"); + must_ignore = has_in_name(argv[0], "_ignore"); if (!test_poll) test_func = &select_thread; else @@ -379,5 +381,5 @@ main (int argc, char *const *argv) WSACleanup(); #endif /* MHD_WINSOCK_SOCKETS */ - return result; + return must_ignore ? (!result) : (result); }