From 3a98efec4d56f20bd2b5ed59fdef088176c4ef5f Mon Sep 17 00:00:00 2001 From: Sebastiano Merlino Date: Sun, 13 Jan 2019 05:39:05 +0000 Subject: [PATCH 1/4] Move make check into an independent execution on travis --- .travis.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6156e9ce..c059cadf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -82,13 +82,11 @@ script: qemu-arm -L /usr/arm-linux-gnueabi/ ./.libs/http_utils ; qemu-arm -L /usr/arm-linux-gnueabi/ ./.libs/threaded ; fi - else - make check ; - cat test/test-suite.log ; - ls -l /usr/local/lib/ ; - ls -l /usr/lib/ ; - if [ "$TRAVIS_OS_NAME" = "linux" ]; then cd ../src/; cppcheck --error-exitcode=1 .; cd ../build; fi - fi + - make check + - cat test/test-suite.log + - ls -l /usr/local/lib/ + - ls -l /usr/lib/ + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then cd ../src/; cppcheck --error-exitcode=1 .; cd ../build; fi after_success: - if [ "$DEBUG" = "debug" ] && [ "$COVERAGE" = "coverage" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then bash <(curl -s https://codecov.io/bash); fi matrix: From a825c08b92a9417cef349da1a6ad6d4cabf02576 Mon Sep 17 00:00:00 2001 From: Sebastiano Merlino Date: Sun, 13 Jan 2019 05:53:07 +0000 Subject: [PATCH 2/4] Fix script --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index c059cadf..ef28c78f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -82,6 +82,7 @@ script: qemu-arm -L /usr/arm-linux-gnueabi/ ./.libs/http_utils ; qemu-arm -L /usr/arm-linux-gnueabi/ ./.libs/threaded ; fi + fi - make check - cat test/test-suite.log - ls -l /usr/local/lib/ From 3341abb61ea5683376efed62f81cd453fe9ca3a1 Mon Sep 17 00:00:00 2001 From: Sebastiano Merlino Date: Sun, 13 Jan 2019 06:32:03 +0000 Subject: [PATCH 3/4] Disable custom fd test on darwin --- configure.ac | 2 ++ test/integ/ws_start_stop.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index b3ae5e70..203e25f6 100644 --- a/configure.ac +++ b/configure.ac @@ -270,6 +270,8 @@ if test x"$coverit" = x"yes"; then case $host_os in darwin* ) echo "Coverage not supported on OSX" + AM_CXXFLAGS="$AM_CXXFLAGS -DDARWIN" + AM_CFLAGS="$AM_CFLAGS -DDARWIN" cond_gcov="no" ;; *) diff --git a/test/integ/ws_start_stop.cpp b/test/integ/ws_start_stop.cpp index 2dbf7d16..cae2d4dc 100644 --- a/test/integ/ws_start_stop.cpp +++ b/test/integ/ws_start_stop.cpp @@ -241,6 +241,7 @@ LT_BEGIN_AUTO_TEST(ws_start_stop_suite, enable_options) LT_END_AUTO_TEST(enable_options) LT_BEGIN_AUTO_TEST(ws_start_stop_suite, custom_socket) +#ifndef DARWIN int fd = socket(AF_INET, SOCK_STREAM, 0); struct sockaddr_in address; @@ -269,6 +270,7 @@ LT_BEGIN_AUTO_TEST(ws_start_stop_suite, custom_socket) curl_easy_cleanup(curl); ws.stop(); +#endif LT_END_AUTO_TEST(custom_socket) LT_BEGIN_AUTO_TEST(ws_start_stop_suite, single_resource) From e671ba38c929bfb155d7057603b915f2b43b8da2 Mon Sep 17 00:00:00 2001 From: Sebastiano Merlino Date: Sun, 13 Jan 2019 06:51:25 +0000 Subject: [PATCH 4/4] Always check darwin --- configure.ac | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 203e25f6..dc42c5f8 100644 --- a/configure.ac +++ b/configure.ac @@ -258,6 +258,13 @@ else AM_CFLAGS="$AM_CXXFLAGS -O3" fi +case $host_os in + darwin* ) + AM_CXXFLAGS="$AM_CXXFLAGS -DDARWIN" + AM_CFLAGS="$AM_CFLAGS -DDARWIN" + ;; +esac + AC_MSG_CHECKING([whether to build with coverage information]) AC_ARG_ENABLE([coverage], [AS_HELP_STRING([--enable-coverage], @@ -270,8 +277,6 @@ if test x"$coverit" = x"yes"; then case $host_os in darwin* ) echo "Coverage not supported on OSX" - AM_CXXFLAGS="$AM_CXXFLAGS -DDARWIN" - AM_CFLAGS="$AM_CFLAGS -DDARWIN" cond_gcov="no" ;; *)