Commit Graph

25 Commits

Author SHA1 Message Date
Brad King 27b812132c Tests/CTestTestMemcheck: Help Xcode 2.x create output dirs
Add the PRE_BUILD step to all targets that need it so the output
directories get created no matter which target is built first.
2014-03-26 15:09:56 -04:00
David Cole 84a4230406 Tests: Prevent unnecessary rebuilds in CTestTestMemcheck
Repeated "cmake . && ninja" calls were resulting in rebuilds every time.

Change the test so that it uses "file(WRITE" to generate a ".in" file and
then configure_file to "copy if different" that ".in" file to the final
generated source file.

Now, rebuilds will only occur if there are changes to the generated source
file on "cmake ." runs after the first one.
2014-03-20 09:02:50 -04:00
Brad King 9f5bd180c8 Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables
s/CMAKE_TEST_GENERATOR/CMAKE_GENERATOR/g
2014-03-03 15:26:49 -05:00
Nils Gladitz 57c008c37a Tests: allow valgrind test to pass with symlinked build dir 2013-12-15 00:31:14 +01:00
Brad King e8e67aed22 CTestTestMemcheck: Fix matching of malloc debug messages
In commit 10bc50ea (Tests: ignore Guard Malloc messages in MemChecker
tests, 2013-05-13) we forgot to escape backslashes in the CMake language
to get them into the regex.  Add them now.
2013-09-13 16:47:47 -04:00
Brad King 8ea62fdf30 CTestTestMemcheck: Tolerate trailing "==..." lines from valgrind 2013-08-16 16:16:27 -04:00
Brad King f169f48f93 CTestTestMemcheck: Refactor output expectation regex generation
Refactor generation of PASS_REGULAR_EXPRESSION for tests

 CTestTestMemcheckDummyPurify
 CTestTestMemcheckDummyValgrind
 CTestTestMemcheckDummyValgrindPrePost
 CTestTestMemcheckDummyValgrindIgnoreMemcheck

Avoid duplicating the normal ctest output matching expression.  Use
literal newlines instead of "\n" to improve readability.  Integrate
matching of guard-malloc lines at the end of the output with expressions
matching tool output like lines for BullseyeCoverage.
2013-08-16 16:16:27 -04:00
Rolf Eike Beer 6f9aaad150 CTest: create one output file per memcheck (#14303)
The output file used for memory checker runs must be unique for every test run
in parallel, so simply make them unique for every test run. Simply use the test
index to avoid collisions.
2013-08-07 22:25:48 +02:00
Rolf Eike Beer c0756b6dd6 Revert "CTest: fix pre and post test commands with spaces" (#13887)
This reverts commit 6187876dea.

It was actually possible before to have paths with spaces in them, the spaces
just need to be quoted. This way spaces will work as argument separators.
2013-07-27 22:05:47 +02:00
Rolf Eike Beer e4e09212c5 Merge branch 'master' into escape-regex-specials-in-path
Resolve conflicts in Tests/CTestTestMemcheck/CMakeLists.txt by combining
changes from both sides.
2013-06-03 13:43:52 -04:00
Modestas Vainius c9b75dcd73 Fix test failures caused by regexp-sensitive characters in the build paths
Checkout [1] as an example of the test failures. In that particular cases, the
failures is caused by the plus sign in the path being pass unescaped
(buildd-cmake_2.8.9-1~bpo60+1-armel-3Lvkef) to the regexp.

In addition to failures in the log, the following new tests also fail in 2.8.11:

  243 - CTestTestMemcheckUnknown (Failed)
  244 - CTestTestMemcheckUnknownQuoted (Failed)
  248 - CTestTestMemcheckDummyValgrindFailPre (Failed)
  249 - CTestTestMemcheckDummyValgrindFailPost (Failed)
  250 - CTestTestMemcheckDummyPurify (Failed)
  251 - CTestTestMemcheckDummyBC (Failed)
  253 - CMake.List (Failed)

[1] https://buildd.debian.org/status/fetch.php?pkg=cmake&arch=armel&ver=2.8.9-1~bpo60%2B1&stamp=1369243896
2013-06-03 16:51:21 +02:00
Brad King 795e369e6b Merge topic 'Memchecker-Mac-fix'
0aed09f Tests: ignore GuardMalloc messages on all Apple build, not just XCode ones
2013-05-24 09:18:56 -04:00
Rolf Eike Beer 0aed09fd20 Tests: ignore GuardMalloc messages on all Apple build, not just XCode ones 2013-05-23 06:31:47 +02:00
Rolf Eike Beer 1a2a6ba4b6 Tests: fix build of dummy memtester on AIX
Both <string> and <cmSystemTools.h> include <stdio.h> one or the other way. It
looks like the CMake header adds a define that will cause another part of the
system header to be used, resulting in conflicting definitions.
2013-05-21 22:58:36 +02:00
Rolf Eike Beer 10bc50eacf Tests: ignore Guard Malloc messages in MemChecker tests 2013-05-14 16:56:06 +02:00
Rolf Eike Beer 159c3e91ac Tests: add a test with custom options passed to valgrind 2013-05-09 19:25:50 +02:00
Rolf Eike Beer cbdfcb0e61 Tests: add test for non-existent Valgrind suppression file 2013-05-09 19:25:46 +02:00
Rolf Eike Beer 7752253192 Tests: verify that memory checker output files are always present
All supported memory checkers now write their output to a file. Use a dummy
checker that ignores the given filename and ensure that the missing file is
reported as error.
2013-05-09 19:24:53 +02:00
Rolf Eike Beer abf1df48fc Tests: remove code duplication in CTestTestMemCheck tests
The code for the tests is basically the same for all those subtests, so have
one template and configure that for as many tests as possible to make it
easier maintainable.
2013-05-09 19:22:31 +02:00
Rolf Eike Beer f4994223bb CTest: remove unreachable code and CTestTestMemcheckUnknown test
The memory checker command can't be quoted at this point, because previously it
has been tested that the given file exists, which will fail if the name is
quoted. The CTestTestMemcheckUnknown test aimed to test this case, has always
failed to do so and serves no useful purpose therefore.
2013-05-09 19:22:29 +02:00
Rolf Eike Beer bcc0f3fb05 Tests: create output files for all memory checkers
The dummy memory tester implementation now understands the command line
switches for all memory checkers to redirect the output to a file. This avoids
triggering the error cases for BoundsChecker and Purify because the output file
does not exist.
2013-05-09 19:22:00 +02:00
Brad King 56ca8d4e63 Tests: Add generator toolset support
Propagate CMAKE_GENERATOR_TOOLSET through the test hierarchy so that all
tests can build with the selected generator toolset, if any.
2013-02-07 11:09:56 -05:00
Rolf Eike Beer 995a35fe12 CTest: add a check with a quoted memory checker 2012-10-04 23:07:31 +02:00
Rolf Eike Beer de8bffc8f8 CTest: add a test for CTEST_CUSTOM_MEMCHECK_IGNORE 2012-10-04 23:07:31 +02:00
Rolf Eike Beer fcae1dacea CTest: add tests that simulate memcheck runs 2012-10-04 23:07:31 +02:00