diff options
author | Juergen Kahrs <Juergen.Kahrs@googlemail.com> | 2013-05-11 10:48:41 +0200 |
---|---|---|
committer | Juergen Kahrs <Juergen.Kahrs@googlemail.com> | 2013-05-11 10:48:41 +0200 |
commit | 61f18b3aac9acf83f06163e37461eea5d915523b (patch) | |
tree | d4a5e73f7a460b7fa1967f122a91dfc65e1eea9d | |
parent | 79c40aa674b3d723cc646a14984d095abff2fa06 (diff) | |
download | egawk-61f18b3aac9acf83f06163e37461eea5d915523b.tar.gz egawk-61f18b3aac9acf83f06163e37461eea5d915523b.tar.bz2 egawk-61f18b3aac9acf83f06163e37461eea5d915523b.zip |
Generated file CTestCustom.cmake contains test cases that shall be skipped.
-rw-r--r-- | cmake/README.txt | 14 | ||||
-rw-r--r-- | test/CMakeLists.txt | 22 |
2 files changed, 36 insertions, 0 deletions
diff --git a/cmake/README.txt b/cmake/README.txt index 60dde159..451f2a6c 100644 --- a/cmake/README.txt +++ b/cmake/README.txt @@ -79,3 +79,17 @@ and several other files). Proceed as describe above for cross-compilers. The command "make ; make package" will build gawk.exe and the installer file +- How can I run test cases ? +You can run all the test cases that are defined in test/Makefile.am. +These test case scripts were not changed, but the way they are invoked has +been adapted to CMake habits. +See http://cmake.org/Wiki/CMake/Testing_With_CTest#Simple_Testing + cmake .. + make + make test # run all test cases + ctest -N # list all test cases but don't run them + ctest -R BASIC # run all test case belonging to group BASIC + ctest -R MPFR # run all test case belonging to group MPFR + ctest -E SHLIB.filefunc # run all tests, except the SHLIB.filefunc test case +Remember that running test cases is possible only after a native build. + diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3aceece9..073ca61b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -44,3 +44,25 @@ foreach(testgroup ${ALL_GROUPS} ) add_test("${testgroup}.${testcase}" ${SHELL_PREFIX} ${CMAKE_SOURCE_DIR}/cmake/basictest ${CMAKE_BINARY_DIR}/gawk ${testcase}${file_suffix} ) endforeach(testcase) endforeach(testgroup) + +# Create an empty configuration file for customizing test execution. +set(CTestCustom ${CMAKE_BINARY_DIR}/CTestCustom.cmake) +file(WRITE ${CTestCustom} "# DO NOT EDIT, THIS FILE WILL BE OVERWRITTEN\n" ) +# Exclude test cases from execution that make no sense on a certain platform. +file(APPEND ${CTestCustom} "set(CTEST_CUSTOM_TESTS_IGNORE\n") +if(WIN32) + file(APPEND ${CTestCustom} " SHLIB.filefuncs\n") + file(APPEND ${CTestCustom} " SHLIB.fnmatch\n") + file(APPEND ${CTestCustom} " SHLIB.fork\n") + file(APPEND ${CTestCustom} " SHLIB.fork2\n") + file(APPEND ${CTestCustom} " SHLIB.fts\n") + file(APPEND ${CTestCustom} " SHLIB.functab4\n") + file(APPEND ${CTestCustom} " SHLIB.inplace1\n") + file(APPEND ${CTestCustom} " SHLIB.inplace2\n") + file(APPEND ${CTestCustom} " SHLIB.inplace3\n") + file(APPEND ${CTestCustom} " SHLIB.readdir\n") + file(APPEND ${CTestCustom} " SHLIB.revtwoway\n") + file(APPEND ${CTestCustom} " SHLIB.rwarray\n") +endif() +file(APPEND ${CTestCustom} ")\n") + |