667a90a Fix sentence break in add_test documentation
96309fc Make TestsWorkingDirectory test a C file
a4a5e37 Use iostream to make Borland happy
cfe53cd Fully specify the path to old-signature add_test
017d4e9 Group adding tests with its properties
561cc33 Only test the default cwd with Makefiles
d87bae7 Simplify the _default_cwd derivation
992c74f Use --><-- markers to denote the path
5249551 Flip slashes around on Windows
0a014da Add ctype.h include for toupper()
af12f83 Fix header includes for C++ and Visual Studio
5597aa2 Rename the project to match the test
9bf4165 Add tests for WORKING_DIRECTORY arg to add_test
42de5d0 Add WORKING_DIRECTORY argument to add_test
7679f9f Rename WorkingDirectory test
d95f817 Add the WORKING_DIRECTORY property to tests
A cycle exists when the DFS returns to the root node, not just when
multiple paths lead to the same node.
Inspired-By: Alexander Esilevich <aesilevich@pathscale.com>
f6f3ae5 Update tag in the Contracts/cse-snapshot test.
1e4fd5f Enable overriding contract test timeout values.
c81ad34 Add a contract test for building the CSE.
942ace8 Fix contract test so it is not hard coded to the vtk542 test.
fd343a1 Add a "Contract" test for VTK. The test downloads and builds VTK.
Apple released an update recently in which there
was a broken symlink for jni.h that pointed to
a non-existent file. CMake had trouble configuring
because it encountered an error trying to read
jni.h.
We avoid the problem here by introducing a variable
CTEST_RUN_Java, which defaults to OFF on Macs, that
indicates whether to even attempt finding java, reading
jni.h and adding the "Java" CMake test.
If you would like to test Java on a Mac where the
jni.h symlink is not busted, feel free to pass in
-DCTEST_RUN_Java:BOOL=ON when configuring CMake.
Use a longer value as the default timeout (6 hours).
For a per-contract-test timeout value, set ${project}_TEST_TIMEOUT
in the project's RunTest.cmake file. To use a longer value for
all non-specific contract tests, set a CMake cache variable
named CMAKE_CONTRACT_TEST_TIMEOUT_DEFAULT.
All timeout values are in seconds.
Also, patch up last commit to defer evaluation of ENV{HOME}
until EnforceConfig.cmake is included at ctest time. This
allows Windows machines to have "\\" characters in the HOME
environment variable if they want to.
To activate the CSE contract test on a given Linux
machine's CMake dashboard, put
CMAKE_CONTRACT_PROJECTS:STRING=cse-snapshot
in the CMake dashboard's initial cache.
The chosen snapshot does not generate subproject
dependency info right now. That code was in a
previous revision in the CSE's svn repo that
apparently has not been merged into the present cse
git repository master branch. After that is fixed up
in the cse repo, we can update the tag here so that
the snapshot built here can run a sub-project based
dashboard script. For now, it runs as one big build
step, building 'all'.
The idea is that we can make sure that CMake is staying backwards
compatible by testing projects against CMake as the changes are made
in CMake. Because these tests will take a long time to run, they
will not be enabled by default. Instead, they will be enabled by
putting a cache variable into CMake.
This command allows a user to quickly see the list of all available
test labels. The labels are also printed in verbose show only mode,
alongside their corresponding tests.
Pass the test when there is "Submission problem" in the output. This is
at least applicable to XMLRPC. Full error message is below:
------
Submission problem: Curl failed to perform HTTP POST request. curl_easy_perform() says: <url> malformed (-504)
.
Problems when submitting via XML-RPC
------
38c762c Merge 'remove-CTestTest3' into ctest-file-checksum
46df0b4 Activate retry code on any curl submit failure.
8705497 Checksum test should use CMAKE_TESTS_CDASH_SERVER
d0d1cdd Mock checksum failure output for old CDash versions
af5ef0c Testing for CTest checksum
86e81b5 CTest should resubmit in the checksum failed case
d6b7107 Fix subscript out of range crash
082c87e Cross-platform fixes for checksum/retry code
e525649 Checksums on CTest submit files, and retry timed out submissions.
The CTestTestFailedSubmit-http test was failing on the
hut11 Experimental dashboards with "Empty reply from
server" due to a localhost settings change.
At this point, CTestTest3 causes more problems than it's worth.
It uses CVS to grab a remote (over the network) copy of kwsys
code for testing. This causes some sort of problem nearly every
night on the nightly CMake dashboards. Worse: it causes problems
on different machines on different nights, then the next day, it's
fine again. So: remove this test and monitor the coverage.
If we lose a significant portion of code coverage, I will revert
this commit and re-activate the test. However, if we do not lose
a significant portion of code coverage, I will remove the code
for the test as well as removing it from the CMakeLists.txt file.
Brad King and I discussed this over the last few weeks, and we both
think we have sufficient coverage of all the checkout and update code
in other locally (non-network) based tests.
On the other hand, even if we do take a mild hit on coverage temporarily,
it should be relatively easy to increase our coverage again by adding
bits to those other locally based tests.
The bootstrap script works under MSYS, so test it. Use a launcher batch
file since 'ctest --build-and-test' is a Windows program and will not
honor the shebang line in the script.
Even though this test is checking that the ctest running it can handle
test output without newlines we should run the just-built CMake binary.
This allows the MemCheck test mode to check the correct CMake.
Add a LinkFlags test series to check that these properties work. Since
no link flag is accepted everywhere we test for presence of flags by
adding a bad flag and looking for the complaint in the test output.
Some Mac linkers produce the message
"file was built for unsupported file format which is not the
architecture being linked"
for this test. Update the test output regex to match it.
If defined and non-empty, the value of CMAKE_TESTS_CDASH_SERVER should point
to a CDash server willing to accept submissions for a project named
PublicDashboard. On machines that also run a CDash dashboard, set this
variable to "http://localhost/CDash-trunk-Testing" so that the CMake tests
that submit dashboards do not have to send those submissions over the wire.
The CTestSubmitLargeOutput test runs a dashboard that has a test that produces
very large amount of output on stdout/stderr. Since we do not even want to
attempt to send such large output over the wire, this test is off by default
unless the CMAKE_TESTS_CDASH_SERVER server is localhost. This test is expected
to cause a submission failure when sent to CDash. It passes if the submit
results contain error output. It fails if the submit succeeds.
CMAKE_TESTS_CDASH_SERVER: CDash server used by CMake/Tests.
If not defined or "", this variable defaults to the server at
http://www.cdash.org/CDash.
If set explicitly to "NOTFOUND", curl tests and ctest tests that use the
network are skipped.
If set to something starting with "http://localhost/", the CDash is expected
to be an instance of CDash used for CDash testing, pointing to a
cdash4simpletest database. In these cases, the CDash dashboards should be
run first.
We teach ADD_TEST_MACRO to transform names of the form "Namespace.Name"
to the directory "Namespace/Name" and the project name "Name". This
will allow new tests to be better organized.
We create test FortranC.Flags to try passing per-language flags from a
project into its FortranCInterface detect/verify checks. We wrap the
compilers with scripts that enforce presence of expected flags.
CMake does not enable Fortran for its own build, but it needs to find a
Fortran compiler to know if it is possible to enable Fortran tests.
Previously we searched for a hard-coded list of Fortran compilers which
was duplicated from the CMakeDetermineFortranCompiler.cmake module. We
now run CMake on a small test project that enables the Fortran language
and reports the compiler it found. This represents a more realistic
check of whether the Fortran tests will be able to find a compiler.
We create option CMake_TEST_INSTALL to enable a new CMake.Install test.
It tests running the "make install" target to install CMake itself into
a test directory. We enable the option by default for dashboard builds.
We configure an EnforceConfig.cmake script to load at CTest time.
Previously we loaded it from Tests/CTestTestfile.cmake, but now we load
it from the top level so it applies to all tests.
This test requires that the dashboard script it drives be invoked with
"ctest -C <config> -S ...". We create a "CTestTest_CONFIG" variable to
hold a configuration selected at test time. We use the configuration
given to the outer CTest, if any, and then default to either Debug or
the CMAKE_BUILD_TYPE.
We extend the CTestTestTimeout test to check that when a test times out
its children (grandchildren of ctest) are killed. Instead of running
the timeout executable directly, we run it through a cmake script that
redirects the timeout executable output to a file. A second test later
runs and verifies that the timeout executable was unable to complete and
write data to the log file. Only if the first inner test times out and
the second inner test passes (log is empty) does the CTestTestTimeout
test pass.
The commit "Fake $HOME to isolate tests from user" started setting $HOME
in the CTest script environment. On some platforms tests depend on some
local configuration in the home directory, such as the "cvs login" for
KWSys in CTestTest3.
In this commit we now construct a fake home dir during CMake config step
and populate it with a .cvspass file needed by the test. We also check
CTEST_NO_TEST_HOME to optionally disable the test home.
See issue #9949.
We test (ARCHIVE|LIBRARY|RUNTIME)_OUTPUT_DIRECTORY_<CONFIG> properties
by building COnly as a subdirectory and setting the properties to put
its files in specific locations. We build an executable that verifies
the targets actually appear where expected.
To enable this test, the option TEST_KDE4_STABLE_BRANCH must be switched on.
It can only be switched on if CMAKE_RUN_LONG_TESTS is ON.
Then the test will only be added if Qt >= 4.5 can be found, Perl can be
found and ZLIB can be found.
Alex
This commit re-writes Borland compiler build rules. We split the rules
into modern <os>-<id>-<lang> information modules but share a common
macro between languages to avoid duplication.
We also address a bug in the previous rules that would build some target
types against the static Borland runtime and others against the shared
Borland runtime in one build tree. Now we always use the shared runtime
as is the default in the rules for MS tools.
Previously we passed inputs to the decision to each Complex test and let
the test source decide. This commit moves the decision out of the tests
and makes it an option() in their source. This makes it possible to
build the Complex tests from outside the CMake test tree.
This adds a "ModuleDefinition" test enabled when using MSVC tools. It
checks that .def files can be used to export .dll and .exe symbols and
create corresponding .lib files that can be linked. See issue #9613.
Policy CMP0002's OLD behavior allows duplicate non-custom targets. We
test it with a project that builds two executables of the same name by
setting CMP0002 to OLD.
Visual Studio 10 uses MSBuild to drive the build. Custom commands
appear in MSBuild files inside CustomBuild elements, which appear inside
ItemGroup elements. The Outputs and AdditionalInputs elements of each
CustomBuild element are evaluated according to timestamps on disk.
MSBuild does not use inputs/outputs to order CustomBuild steps within a
single ItemGroup or across multiple ItemGroup elements. Instead we must
put only unrelated CustomBuild elements in a single ItemGroup and order
the item groups from top to bottom using a topological order of the
custom command dependency graph.
This fixes CustomCommand and ExternalProject test failures, so we remove
the expectation of these failures.
cmCTestScriptHandler, but have it load the new script CTestScriptMode.cmake
-> that makes it more flexible, also add a simple test that the system name
has been determined correctly
Alex
This test creates a C executable that links to a C++ static library. On
most platforms the executable will not link unless the C++ linker is
chosen correctly.
This creates cmCTestHG to drive CTest Update handling on hg-based work
trees. Currently we always update to the head of the remote tracking
branch (hg pull), so the nightly start time is ignored for Nightly
builds. A later change will address this.
See issue #7879. Patch from Emmanuel Christophe. I modified the patch
slightly for code style, to finish up some parsing details, and to fix
the test.
This test requires a long time on slower machines, so we need to extend
its timeout. It is an important test, so it does not fall under the
CMAKE_RUN_LONG_TESTS option. In the future we should try to shorten the
test by building simpler external projects.
The test needs to create a cvs repository with 'cvs init', but the CVSNT
client on Windows needs 'cvs init -n' to avoid administrator access.
Previously we required users to explicitly enable CTEST_TEST_UPDATE_CVS
to activate the test on Windows.
This teaches the test to use the '-n' option when necessary. Now we can
enable the test in all cases except when trying to use a cygwin cvs.exe
without cygwin paths.
The BZR xml output plugin can use some encodings that are not recognized
by expat, which leads to "Error parsing bzr log xml: unknown encoding".
This works around the problem by giving expat a mapping, and adds a
test. Patch from Tom Vercauteren. See issue #6857.
This creates cmCTestBZR to drive CTest Update handling on bzr-based work
trees. Currently we always update to the head of the remote tracking
branch (bzr pull), so the nightly start time is ignored for Nightly
builds. A later change will address this. Patch from Tom Vercauteren.
See issue #6857.
This creates cmCTestGIT to drive CTest Update handling on git-based work
trees. Currently we always update to the head of the remote tracking
branch (git pull), so the nightly start time is ignored for Nightly
builds. A later change will address this. See issue #6994.
This teaches functions and macros to use policies recorded at creation
time when they are invoked. It restores the policies as a weak policy
stack entry so that any policies set by a function escape to its caller
as before.
The new 'testing' test behavior of actually running the tests generated
by the project still fails when the test script guesses the Debug
configuration but the CMake build tree was only built Release. The
inner ctest needs to find the ctest executable but is given the wrong
configuration.
The recent change of the 'testing' test to actually drive the tests
within it does not work on Windows with released CMakes 2.6.2 and lower
if no configuration is given to ctest with a -C option. This works
around the problem by detecting the case and changing the empty
configuration to Debug.
The 'testing' CMake test builds a project that uses add_test. This
strengthens the test to actually run CTest on the project build tree
after building it.
When CMake is built by CMake 2.4 or lower the FindCVS module is not
available. In that case we activiate CTest.UpdateCVS by searching for
the cvs command directly.
This creates new tests "CTest.UpdateSVN" and "CTest.UpdateCVS". They
test that the Update.xml produced by CTest for a version-controlled
project contains entries for files added, changed, and removed.
This introduces the unset() command to make it easy to unset CMake
variables, environment variables, and CMake cache variables. Previously
it was not even possible to unset ENV or CACHE variables (as in
completely remove them). Changes based on patch from Philip Lowman.
See issue #7507.
We frequently need to wipe out all the CMake test build directories in
order to run tests from scratch. This change adds a test_clean custom
target to remove all these directories for out-of-source builds.
major issues:
-access() doesn't return false for an empty string (#ifdefed in cmake)
-dlopen() doesn't return 0 on failure (#ifdefed in cmake and fixed now in Syllable)
-the kwsys and Bootstrap tests fail with timeout due to the fact that I'm doing all that in qemu, which is quite slow
-RPATH is now supported, so without modifying the test adapting DLL_PATH in Syllable is required for the tests to succeed
-the Plugin test fails with an undefined reference to example_exe_function() in example_mod_1, it seems this isn't supported under Syllable
Alex