From ac2eee3907af1b6c22cd1be26c8734601ec57c97 Mon Sep 17 00:00:00 2001 From: Erik Boasson Date: Tue, 10 Sep 2019 19:08:54 +0200 Subject: [PATCH] Skip the statistical tests on the random generator Those fail with a small probability, but it is still annoying. The code has been vetted and tested; and by disabling the test only when run in the CI infrastructure, anyone changing the code would still have the test run locally. Signed-off-by: Erik Boasson --- .travis.yml | 18 +++++++++++++++++- appveyor.yml | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4855ea4..8285890 100644 --- a/.travis.yml +++ b/.travis.yml @@ -162,6 +162,22 @@ before_script: - conan profile new default --detect - conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan +# Notes on test settings: +# - CYCLONEDDS_URI: +# - EnableExpensiveChecks: for the few horrendously expensive (but pretty thorough) +# integrity checks, in particular on the WHC and the RHC, but there may be more +# - config to stderr: gives the configuration used when running the test in conjunction +# with "--output-on-failure" (sadly that still doesn't output the failed +# assertions ...) +# - -j 4: run 4 tests in parallel, this saves quite a bit of time because the VMs are +# all dual-core +# - --output-on-failed: print whatever output the test generated when it failed, which +# can obviously be quite helpful for debugging +# - -E ...: regex of tests to exclude: +# CUnit_ddsrt_random_default_random: performs a Chi-square test on the output of +# the random generator, but this does produce the odd failure (it should!). The +# code has been vetted, the test has been run a great many times (with the odd +# failure), and so we now simply skip the test to avoid the spurious failures. script: - mkdir build - cd build @@ -184,7 +200,7 @@ script: ${SCAN_BUILD} cmake --build . --config ${BUILD_TYPE} --target install ;; esac - - CYCLONEDDS_URI='allconfigstderr' ctest -j 4 --output-on-failure -T test -C ${BUILD_TYPE} + - CYCLONEDDS_URI='allconfigstderr' ctest -j 4 --output-on-failure -T test -E '^CUnit_ddsrt_random_default_random$' -C ${BUILD_TYPE} - if [ "${ASAN}" != "none" ]; then CMAKE_LINKER_FLAGS="-DCMAKE_LINKER_FLAGS=-fsanitize=${USE_SANITIZER}"; CMAKE_C_FLAGS="-DCMAKE_C_FLAGS=-fsanitize=${USE_SANITIZER}"; diff --git a/appveyor.yml b/appveyor.yml index ed302a7..5bf38d1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -47,4 +47,4 @@ build_script: test_script: - set "CYCLONEDDS_URI=allconfigstderr" - - ctest --output-on-failure --parallel 4 --test-action test --build-config %CONFIGURATION% + - ctest --output-on-failure --parallel 4 --exclude-regex "^CUnit_ddsrt_random_default_random$" --test-action test --build-config %CONFIGURATION%