Commit Graph

1257 Commits

Author SHA1 Message Date
Brad King cbfbb86b58 Fix escapes in Fortran depend.make entries
Makefile dependencies must be escaped using cmLocalGenerator::Convert
with the cmLocalGenerator::MAKEFILE option.  This fixes Fortran module
dependencies with spaces in the path.  We test the fix by adding a space
to one of the module paths in the Fortran test.
2010-01-04 10:18:44 -05:00
David Cole aad15c3abf Fix issue #10060 - add APPEND arg to ctest_start command.
If APPEND is given to ctest_start, it will read the tag from the current existing Testing/TAG file rather than creating a new one based on the current time stamp. This allows a developer to run several dashboard scripts in a row, all of which will share the same tag/stamp/buildid when they finally get submitted to CDash. Now you can split the running of build phases and test phases for the same dashboard row into multiple scripts.
2009-12-29 14:38:31 -05:00
Brad King 5cf77136cb Longer CTestTestTimeout default time on Cygwin
The commit "Make CTestTestTimeout time configurable" added a CMake cache
variable CTestTestTimeout_TIME to configure the length of the timeout
used by the inner CTestTestTimeout test.  The reason was to allow users
on slow machines to give this test some extra time without extending the
timeout for everyone.  However, Cygwin CMake seems to load slowly enough
that it is worth a longer default timeout for that platform.
2009-12-21 10:00:51 -05:00
Brad King 918355632c Test for SVNPath element in Update.xml
The commit "Submit Subversion directory path in Update.xml" added the
element <SVNPath>...</SVNPath> to Update.xml for Subversion work trees.
This commit teaches the CTest.UpdateSVN test to verify the presence of
the element.
2009-12-18 11:01:24 -05:00
Bill Hoffman bdcce34435 Fix BadExe test on cygwin. 2009-12-18 09:24:49 -05:00
Brad King a73833d037 Submit global tree revision in Update.xml
We teach CTest to report in a <Revision> element the revision of the
source tree that was tested.  This makes sense for all modern VCS tools
because they version the whole tree.  We simply omit this element for
CVS because it only versions files.  See issue #7541.
2009-12-18 08:13:51 -05:00
Brad King 11e6b513c2 Test the CheckTypeSize module
We create test "Module.CheckTypeSize" to verify that type sizes get
detected correctly.
2009-12-17 15:15:34 -05:00
Brad King 6c9f678098 Teach ADD_TEST_MACRO about test namespaces
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.
2009-12-17 15:14:14 -05:00
Zach Mullen 5c2a5e06fd Workaround for CTestTestBadExe on Cygwin 2009-12-17 12:51:40 -05:00
David Cole 5eb8e80b2a Add a test to build the CSE project if the optional cache entry CMAKE_TEST_PROJECT_CSE_DIR is set. 2009-12-15 16:52:27 -05:00
Brad King 1ac1058272 Honor real language flags in FortranC.Flags test
The test overrides the CMAKE_C_FLAGS and CMAKE_Fortran_FLAGS to test
passing a specific flag to the compiler wrapper scripts.  We fix it to
honor any outside flags needed for the real compiler.
2009-12-15 14:03:03 -05:00
Brad King 0306080e6e FortranCInterface: Support '=' in language flags
The commit "FortranCInterface: Honor language flags in checks" taught
the FortranCInterface module to pass C and Fortran flags into its
detection and verification checks.  We improve on the change to allow
the '=' character in the language flags.  This requires passing the
cache entry type with the -D options.
2009-12-15 14:02:52 -05:00
David Cole c31b7fcad0 Add one more possible error message from curl for the failed submit tests. 2009-12-14 22:43:40 -05:00
Brad King 555fcbd2e2 Test FortranCInterface flag propagation
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.
2009-12-14 12:36:25 -05:00
Brad King 55275e017d New decision method to enable Fortran tests
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.
2009-12-10 12:16:38 -05:00
Brad King faf6d82bd6 Always use a configuration for CMake tests
Previously our EnforceConfig script that loads at test-time would only
enforce a non-empty CTEST_CONFIGURATION_TYPE for CMake 2.6.2 and lower.
Now we simply always enforce use of a configuration, and select one of
the configurations that was built if none is given.

This is necessary to run tests like CMake.Install that need to know the
configuration with which CMake was built.
2009-12-10 11:19:23 -05:00
Brad King 6c79c96265 Test 'install' target of CMake itself
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.
2009-12-10 10:34:36 -05:00
Brad King 9d823f7847 Apply CMake test-time config to all tests
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.
2009-12-10 10:33:42 -05:00
Brad King 9478ad0945 Create CMakeLibTests output dir for Xcode
Xcode 2.x forgets to create the target output directory before linking
the individual architecture pieces of a universal binary for the target
CMakeLibTests.  Then it passes the directory to -L and -F options when
linking the and warns that the directory does not exist.  We work around
the problem by using a pre-build rule on the target to create the output
directory.
2009-12-09 10:56:30 -05:00
Brad King f5ac85a29e Test XML encoding with UTF-8 character validation
This creates a unit test for cmXMLSafe.  See issue #10003.
2009-12-08 15:44:45 -05:00
Brad King 0a64936f49 Test UTF-8 decoding
This creates a unit test for cm_utf8.  See issue #10003.
2009-12-08 15:44:22 -05:00
Brad King 5872cc7c1f Create CMakeLib test driver and test cmXMLParser
We create a new CMakeLibTests driver executable in which to writes unit
tests for CMakeLib.  Our first test is a smoke-test of cmXMLParser.
2009-12-08 11:44:50 -05:00
Brad King d4ada9d0d5 Clean up CMake build tree 'bin' directory
We re-arrange EXECUTABLE_OUTPUT_PATH settings to avoid putting utility
and test executables in the 'bin' directory of the build tree.  This
makes the directory look like that in the installation tree, except that
on multi-configuration generators we still use a per-config
subdirectory.
2009-12-08 11:44:28 -05:00
Brad King 1d91bc64aa Remove unused DumpDocumentation code
The DumpDocumentation executable and some supporting code and tests were
completely unused by CMake.  Generation of documentation is done by the
individual executables with --help* options.  In this commit we simply
remove the unused code, executable, and test.
2009-12-08 09:38:36 -05:00
David Cole 1e04804e84 Force CheckSourceTree test to pass if the source tree is not a CVS checkout. The test can only do its checking if cvs is available and the source tree is a cvs checkout. Also, allow for the possibility that backslash characters exist in the HOME environment variable, because they may when built in a cygwin environment on Windows. 2009-12-07 11:54:23 -05:00
Zach Mullen 25d7399272 Remove WILL_FAIL property from BadExe test, since CTest was returning 0. Replaced with a pass regex. 2009-12-07 10:15:34 -05:00
Zach Mullen a8ab3005ae Cosmetic changes to previous commit, for consistency. 2009-12-07 09:37:32 -05:00
Zach Mullen f30c82f370 Added a unit test for running a test command which exists but is not an executable, because it previously caused the outer ctest process to fail. 2009-12-07 09:34:05 -05:00
David Cole 8d28ce8029 Fix cvs password problems during the CMake.CheckSourceTree test. Make sure cvs has access to the original value of the HOME environment variable and not the 'CMake testing' value of it so that any cvs passwords set up on the machine work to get the list of local modifications using 'cvs up'... 2009-12-04 14:50:37 -05:00
David Cole 0b38bb4c53 Fix issue #2336 - honor the -C arg to ctest. Honor it for all stages of running -D dashboards from the command line and running ctest_configure, ctest_build and ctest_test commands in -S scripts. Also, allow a script to change it by setting the CTEST_CONFIGURATION_TYPE variable: allows for multiple configuration build/test cycles within one script. Add a new signature for the cmake command build_command that accepts CONFIGURATION as one argument. The original build_command signature is still there, but now marked as deprecated in the documentation. Of course... also add CTestConfig tests to verify that -C is honored for -D dashboards and -S scripts. 2009-12-04 12:09:01 -05:00
Brad King 9daa4a6c3f Remove CMAKE_SHARED_MODULE_RUNTIME_${lang}_FLAG
This platform configuration variable is unused.  Modules are built using
the value of CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG.
2009-12-02 15:17:32 -05:00
Zach Mullen f3cd66577f Remove unnecessary configure time operations from CTestTest* tests 2009-12-02 09:42:06 -05:00
Brad King b14734b9b6 Make CTestTestTimeout time configurable
In this test we start up a cmake script that runs a process that sleeps,
and the timeout for the script is shorter than the sleep time.  However,
in order to properly detect that the sleeping grandchild is killed when
the script times out we need to give sufficient time for the script to
start the grandchild.  Otherwise the log file for the grandchild is not
available.

On some (cygwin) builds our previous 1 second timeout for the script was
not long enough to let the interpreter load and start the grandchild.
We make the timeout time configurable by setting CTestTestTimeout_TIME
in the cache for CMake itself.  It tells the test how long to let the
script run.  The grandchild always sleeps for 4 seconds longer to ensure
a comfortable window during which the process tree can be killed.
2009-12-02 09:31:49 -05:00
Brad King ed55b1b8d2 Remove unused code from CTest test suite
We remove from Tests/CTestTest*/CMakeLists.txt some historical cruft
that is no longer used by the test suite.
2009-12-02 09:16:29 -05:00
Brad King 7380d3ab7c Always use a configuration for CTestTestTimeout
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.
2009-12-01 09:12:07 -05:00
Brad King 88eefaced1 CTest: Test process tree kill on timeout
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.
2009-11-30 16:31:28 -05:00
Brad King 5152bf5639 Cleanup CMakeBuildTest in test_clean target
The test_clean target is supposed to remove all test build directories.
We add the build directory for CMakeBuildTest because it was missing.
2009-11-30 11:16:13 -05:00
Brad King 1d6e7ed71f Improve fake $HOME test isolation code
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.
2009-11-24 12:15:33 -05:00
Brad King bb18790397 Test CMP0015 OLD and NEW link_directories behavior
We create a LinkDirectory test to check that the policy OLD and NEW
behaviors work as documented.  See issue #9697.
2009-11-24 11:17:16 -05:00
Brad King 647d7105b4 Fake $HOME to isolate tests from user
On platforms with $HOME in the environment, some of our features use it
to store information in the user home directory.  However, tests for
these features should not touch the real user home directory.  Instead
we configure a fake $HOME that points inside the build tree for use
during testing.

See issue #9949.
2009-11-23 14:24:53 -05:00
Zach Mullen 1da9b54a59 BUG 9950: increase timeout for BootstrapTest to 1.5 hours 2009-11-23 10:22:09 -05:00
Brad King 5fbefd66dc Fix get_filename_component(... REALPATH) work dir
The commit "Fix get_filename_component ABSOLUTE mode" broke REALPATH
treatment of relative paths because it stopped storing the absolute path
in local variable 'filename'.  This commit fixes the call to GetRealPath
to use the proper local variable and adds a test.
2009-11-18 10:56:40 -05:00
David Cole 1412cc442e SimpleInstall test now builds an installer package if CTEST_TEST_CPACK is ON at the Tests/CMakeLists.txt level. 2009-11-16 15:35:04 -05:00
Zach Mullen c9c0ee4056 Change logic of ctest subdirs command to allow for absolute paths. Also added test coverage for passing absolute paths to subdirs. 2009-11-10 10:40:24 -05:00
Bill Hoffman d1513e0f0b Allow test to work on machines with umasks that do not allow files to be overwritten. 2009-11-09 12:48:31 -05:00
Zach Mullen 8658fcbe24 Fix TRY_RUN cross compile test to pass consistently 2009-11-09 12:05:49 -05:00
Zach Mullen ef84e81011 Added test coverage for TRY_RUN in cross compile mode. 2009-11-09 11:14:21 -05:00
David Cole d6fe0438c1 Fix issue #9851 - only seed the random number generator on the first call to STRING(RANDOM or if given the new RANDOM_SEED argument. Add test and documentation of new argument. 2009-11-06 10:07:10 -05:00
Brad King dc577fb8b1 Check Mac linker lines in ImplicitLinkInfo test
We add sample linker invocation lines for the GNU compiler on Mac.
2009-11-05 12:17:21 -05:00
Brad King 56d4619984 Remove non-language implicit link dependencies
Some compilers use implicit link options of the form

  -lcrt*.o
  -lgcc*
  -lSystem      (on Mac)
  -lSystemStubs (on Mac)

that provide system-wide symbols not specific to any language.
These need not be listed explicitly for mixed-language linking.

We teach CMake to remove the above items from the implicit library list
of each language.  This change makes it possible to mix GNU compiler
versions in some cases.
2009-11-05 12:17:08 -05:00