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.
10bc50e Tests: ignore Guard Malloc messages in MemChecker tests
159c3e9 Tests: add a test with custom options passed to valgrind
61ddb93 CTest: fix comment documenting cmBoundsCheckerParser class
cbdfcb0 Tests: add test for non-existent Valgrind suppression file
3b5b758 CTest: drop suppression for gcc 2.9.6 errors from default Valgrind flags
7752253 Tests: verify that memory checker output files are always present
abf1df4 Tests: remove code duplication in CTestTestMemCheck tests
f499422 CTest: remove unreachable code and CTestTestMemcheckUnknown test
dde6306 CTest: use an output file for Valgrind (#14110)
bcc0f3f Tests: create output files for all memory checkers
PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION both take a list of expressions.
Stop searching if the first of those has matched the output as the result will not
change anymore.
Replace use of AppendEnv/RestoreEnv pairs with instances of
SaveRestoreEnvironment. Simplify the signature of AppendEnv and use it
in place of similar loops elsewhere. Move the RestoreEnv implementation
inside the SaveRestoreEnvironment destructor which is the only place
left that calls it.
When add_test(NAME) is called without the CONFIGURATIONS argument then
the test is intended to run in any configuration. In multi-config
generators like the VS IDE and Xcode tests created by add_test(NAME) can
only be run when testing a known configuration (otherwise there is no
way to generate the test command line). If no test command line is
known for a particular configuration, or if no configuration is given to
ctest, report the test as not run instead of silently skipping it.
Also fix CMake's own TestsWorkingDirectory test invocation to correct a
previously silent failure exposed by this change.
Restore CMake 2.6 behavoir where the dart processing apparently was run from within the tests directory instead of the root of the build tree. This addresses issue reported on the VTK Dashboard where the Testing/Temporary directory is defined as ../../../Testing/Temporary but the DartProcessing is run with respect to the root of the build tree. This causes the regression/difference images to not be located by ctest and thus not uploaded to the dashboard.
Refactor how cmCTestMemCheckHandler computes the memory tester command
line options to avoid encoding them in a single string just to parse
them again. The EscapeSpaces uses backslahes to escape spaces on UNIX
platforms, so replace other calls to it in CTest that are used to create
human-readable strings with simple double-quoting.
Change types of local variables, or casting, or re-arrange
expressions to get rid of "conversion may alter value" warnings
as seen on recent dashboard submissions from londinium.kitware.
The SaveRestoreEnvironment helper object makes sure that the
original environment is restored immediately after the
StartProcess call returns rather than waiting for the end
of the test. When tests are executed in parallel, there is
no guarantee about the ordering of EndTest calls relative
to StartTest calls. In fact, it would be odd for them to
be nested nicely. Therefore, to avoid the corruption of
the calling ctest's environment, the original environment
must be restored before ForkProcess returns.
This converts the CMake license to a pure 3-clause OSI-approved BSD
License. We drop the previous license clause requiring modified
versions to be plainly marked. We also update the CMake copyright to
cover the full development time range.
This commit fixes cmCTestRunTest and cmProcess to more efficiently
handle child output. We now use the buffer for each child output pipe
to hold at most a partial line plus one new block of data at a time.
All complete lines are scanned in-place, and then only the partial line
at the end of the buffer is moved back to the beginning before appending
new data.
We also simplify the cmProcess interface by making GetNextOutputLine the
only method that needs to be called while the process is running. This
simplifies cmCTestRunTest so that CheckOutput can be called until it
returns false when the process is done.