From c22b939630ff3fd8e44214e947b64ce995b342f7 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 20 Aug 2016 18:59:28 +0200 Subject: [PATCH] Be less strict about warnings from "example tests" (#1045) The build is no longer aborted when one of the "example tests" produces a message on stderr. However, on Travis this requirement is still made. This should catch "bad errors" via Travis while not breaking the build for users. Fixes: https://github.com/awesomeWM/awesome/issues/821 Signed-off-by: Uli Schlachter --- .travis.yml | 2 +- tests/examples/CMakeLists.txt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 75026cd4f..258add8bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -126,7 +126,7 @@ install: return $result } script: - - export CMAKE_ARGS="-DLUA_LIBRARY=${LUALIBRARY} -DLUA_INCLUDE_DIR=${LUAINCLUDE} -D OVERRIDE_VERSION=$AWESOME_VERSION -D DO_COVERAGE=${DO_COVERAGE}" + - export CMAKE_ARGS="-DLUA_LIBRARY=${LUALIBRARY} -DLUA_INCLUDE_DIR=${LUAINCLUDE} -D OVERRIDE_VERSION=$AWESOME_VERSION -D DO_COVERAGE=${DO_COVERAGE} -DSTRICT_TESTS=true" - | set -ev if [ -n "$BUILD_IN_DIR" ]; then diff --git a/tests/examples/CMakeLists.txt b/tests/examples/CMakeLists.txt index 7458e7ca5..2ac21a875 100644 --- a/tests/examples/CMakeLists.txt +++ b/tests/examples/CMakeLists.txt @@ -159,7 +159,9 @@ function(run_test test_path namespace escaped_content) if (NOT TEST_ERROR STREQUAL "") message("${TEST_OUTPUT}") message("${TEST_ERROR}") - message(FATAL_ERROR ${test_path} " A test failed, bye") + if (STRICT_TESTS) + message(FATAL_ERROR ${test_path} " A test failed, bye") + endif() endif() # Read the code and turn it into an usage example.