From: Michael Wallner Date: Tue, 29 Sep 2020 08:55:15 +0000 (+0200) Subject: travis: be nice X-Git-Tag: 1.1.0-beta1~236^2~40 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=2b1e2cd28a097ba1fb8613ee17b9560e82aa2470;p=m6w6%2Flibmemcached travis: be nice --- diff --git a/.travis.yml b/.travis.yml index 1131323d..7ad1566b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,7 @@ script: - cd build - cmake -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=${BUILD} -DENABLE_SASL=${SASL} -DMEMCACHED_BINARY=${PREFIX:-/usr}/bin/memcached .. - make -j2 - - make test + - make test VERBOSE=1 - make install DESTDIR=. #before_cache: diff --git a/CMakeConfig.txt b/CMakeConfig.txt index 7f611de5..b99b507d 100644 --- a/CMakeConfig.txt +++ b/CMakeConfig.txt @@ -44,8 +44,11 @@ set(ENABLE_SANITIZERS "" if(BUILD_TESTING) set(MEMCACHED_BINARY "/usr/bin/memcached" CACHE FILEPATH "memcached binary") - set(CMAKE_CTEST_ARGUMENTS "--output-on-failure;-j2;--repeat;until-pass:2" - ) # available since CMake 3.17 + set(CMAKE_CTEST_ARGUMENTS "--output-on-failure") + if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.17) + # available since CMake 3.17 + list(APPEND CMAKE_CTEST_ARGUMENTS -j2 --repeat until-pass:2) + endif() endif() if(BUILD_DOCS) diff --git a/test/lib/MemcachedCluster.cpp b/test/lib/MemcachedCluster.cpp index c03bacce..63155e94 100644 --- a/test/lib/MemcachedCluster.cpp +++ b/test/lib/MemcachedCluster.cpp @@ -9,7 +9,11 @@ void MemcachedCluster::init() { Retry cluster_is_listening([this]() { return cluster.isListening(); }); - REQUIRE(cluster_is_listening()); + while (!cluster_is_listening()) { + cluster.stop(); + cluster.wait(); + cluster.start(); + } REQUIRE(memcached_create(&memc)); for (const auto &server : cluster.getServers()) {