|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53014 - in branches/release: libs/optional/test libs/tr1/test tools/build/CMake
From: dgregor_at_[hidden]
Date: 2009-05-15 00:44:28
Author: dgregor
Date: 2009-05-15 00:44:20 EDT (Fri, 15 May 2009)
New Revision: 53014
URL: http://svn.boost.org/trac/boost/changeset/53014
Log:
Add support for "known failures", which match the build name via a
regular expression and are attached to test cases as a "known-failure"
label.
Text files modified:
branches/release/libs/optional/test/CMakeLists.txt | 3 ++-
branches/release/libs/tr1/test/CMakeLists.txt | 5 +++++
branches/release/tools/build/CMake/BoostTesting.cmake | 28 +++++++++++++++++++++++-----
3 files changed, 30 insertions(+), 6 deletions(-)
Modified: branches/release/libs/optional/test/CMakeLists.txt
==============================================================================
--- branches/release/libs/optional/test/CMakeLists.txt (original)
+++ branches/release/libs/optional/test/CMakeLists.txt 2009-05-15 00:44:20 EDT (Fri, 15 May 2009)
@@ -3,7 +3,8 @@
boost_test_run(optional_test)
boost_test_run(optional_test_tie)
-boost_test_run(optional_test_ref)
+boost_test_run(optional_test_ref
+ KNOWN_FAILURES "gcc-4.[0-3].[0-9]-.*")
boost_test_run(optional_test_inplace)
boost_test_run(optional_test_io)
boost_test_compile_fail(optional_test_fail1)
Modified: branches/release/libs/tr1/test/CMakeLists.txt
==============================================================================
--- branches/release/libs/tr1/test/CMakeLists.txt (original)
+++ branches/release/libs/tr1/test/CMakeLists.txt 2009-05-15 00:44:20 EDT (Fri, 15 May 2009)
@@ -62,3 +62,8 @@
message(STATUS "TR1 tests need some love")
# boost_glob_test_compile(std_headers *.cpp "-DTEST_STD=1" STD_HEADER_TEST)
boost_glob_test_compile(cyclic_depend *.cpp "")
+
+# Known failures
+boost_test_known_failures(test_cmath_tricky_std "gcc-4.0.[0-9]-.*")
+boost_test_known_failures(test_mem_fn_tricky_std "gcc-4.0.[0-9]-.*")
+boost_test_known_failures(test_ref_wrapper_tricky_std "gcc-4.0.[0-9]-.*")
\ No newline at end of file
Modified: branches/release/tools/build/CMake/BoostTesting.cmake
==============================================================================
--- branches/release/tools/build/CMake/BoostTesting.cmake (original)
+++ branches/release/tools/build/CMake/BoostTesting.cmake 2009-05-15 00:44:20 EDT (Fri, 15 May 2009)
@@ -122,9 +122,9 @@
endwhile()
endforeach()
- foreach (include ${THIS_TEST_DEPENDS_ALL})
- include_directories("${Boost_SOURCE_DIR}/libs/${include}/include")
- endforeach (include ${includes})
+ foreach (include ${THIS_TEST_DEPENDS_ALL})
+ include_directories("${Boost_SOURCE_DIR}/libs/${include}/include")
+ endforeach (include ${includes})
endmacro(boost_additional_test_dependencies libname)
#-------------------------------------------------------------------------------
@@ -141,6 +141,7 @@
# [LINK_FLAGS linkflags]
# [LINK_LIBS linklibs]
# [DEPENDS libdepend1 libdepend2 ...]
+# [KNOWN_FAILURES string1 string2 ...]
# [COMPILE] [RUN] [FAIL])
#
# testname is the name of the test. The remaining arguments passed to
@@ -170,7 +171,7 @@
set(BOOST_TEST_OKAY TRUE)
set(BOOST_TEST_COMPILE_FLAGS "")
parse_arguments(BOOST_TEST
- "BOOST_LIB;LINK_LIBS;LINK_FLAGS;DEPENDS;COMPILE_FLAGS;ARGS;EXTRA_OPTIONS"
+ "BOOST_LIB;LINK_LIBS;LINK_FLAGS;DEPENDS;COMPILE_FLAGS;ARGS;EXTRA_OPTIONS;KNOWN_FAILURES"
"COMPILE;RUN;LINK;FAIL;RELEASE;DEBUG"
${ARGN}
)
@@ -207,9 +208,21 @@
if (NOT BUILD_REGRESSION_TESTS)
set(BOOST_TEST_OKAY FALSE)
endif(NOT BUILD_REGRESSION_TESTS)
-
endmacro(boost_test_parse_args)
+# This macro attaches a the "known-failure" label to the given test
+# target if the build name matches any of the declared, known
+# failures.
+macro(boost_test_known_failures TEST)
+ foreach(PATTERN ${ARGN})
+ if (${BUILDNAME} MATCHES ${PATTERN})
+ set_tests_properties("${PROJECT_NAME}-${TEST}"
+ PROPERTIES LABELS "${PROJECT_NAME};known-failure")
+ endif()
+ endforeach()
+endmacro(boost_test_known_failures)
+
+
# This macro creates a Boost regression test that will be executed. If
# the test can be built, executed, and exits with a return code of
# zero, it will be considered to have passed.
@@ -282,6 +295,7 @@
PROPERTIES
LABELS "${PROJECT_NAME}"
)
+ boost_test_known_failures(${testname} ${BOOST_TEST_KNOWN_FAILURES})
# Make sure that the -test target that corresponds to this
# library or tool depends on this test executable.
@@ -357,6 +371,8 @@
LABELS "${PROJECT_NAME}"
)
+ boost_test_known_failures(${testname} ${BOOST_TEST_KNOWN_FAILURES})
+
if (BOOST_TEST_FAIL)
set_tests_properties(${BOOST_TEST_TESTNAME} PROPERTIES WILL_FAIL ON)
endif ()
@@ -410,6 +426,8 @@
LABELS "${PROJECT_NAME}"
)
+ boost_test_known_failures(${testname} ${BOOST_TEST_KNOWN_FAILURES})
+
if (BOOST_TEST_FAIL)
set_tests_properties(${BOOST_TEST_TESTNAME} PROPERTIES WILL_FAIL ON)
endif ()
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk