Commit Graph

1507 Commits

Author SHA1 Message Date
Brad King d868ec9406 Merge branch 'add-git-to-CheckSourceTreeTest' 2010-06-07 14:28:45 -04:00
Brad King 0d07e4379e Merge branch 'improve-file-download'
Conflicts:
	Modules/ExternalProject.cmake
2010-06-07 14:26:24 -04:00
Brad King a03e85f13c Merge branch 'add-git-to-ExternalProject'
Conflicts:
	Modules/ExternalProject.cmake
2010-06-07 14:23:45 -04:00
David Cole f6909a69ec Use the long test timeout value for SubmitLargeOutput.
Hopefully this will be a large enough value to get the
large output test to pass on the still exceedingly slow
dash19.
2010-06-03 17:47:48 -04:00
David Cole 29383b4b85 Add FindGit module.
Use it from ExternalProject and the ExternalProject test's
CMakeLists file rather than having duplicate find_program calls.
Add logic so that we do not try to use *.cmd variants of git
programs when using the MSYS Makefiles generator. Should fix
the last remaining dashboard issue with the new ExternalProject
git support additions.

Also, correct minor problem regarding placement of the local git
repo during test execution. On clean builds, it was being placed
incorrectly because of the ../.. relative reference. Use an absolute
path to place the local git repo in the proper directory, and only
use the relative reference when referring to it.
2010-06-03 17:30:07 -04:00
David Cole d569b48b7a Use relative path for git repo reference.
So it will work with git_EXECUTABLE='C:\cygwin\bin\git.exe' in a
non-cygwin-based build.
2010-06-03 15:59:36 -04:00
Zach Mullen e525649a4e Checksums on CTest submit files, and retry timed out submissions. 2010-06-03 10:34:34 -04:00
Brad King c8b13ecc38 Intel-specific workaround for LinkFlags tests
The Intel C compiler for Linux does not seem to reject any bad flags or
object files on its link lines.  Work around the problem by using a
preprocessor #error directive to ensure that BADFLAG appears in the
build output.  This does not really achieve the purpose of the tests but
it allows them to pass.
2010-06-03 09:47:23 -04:00
David Cole e73ad22e38 Fix ExternalProject test failures on dashboards.
Double quote executable names that may have spaces in them.
Do not run the new git portions of the test on machines that
have git < version 1.6.5 on them.
2010-06-02 18:05:41 -04:00
David Cole 670e16af2d Add git support to ExternalProject.
Requires at least version 1.6.5 of a git client for
git submodule update --recursive use.
2010-06-02 16:28:04 -04:00
Brad King a9b24af25c Borland-specific bad flag for LinkFlags tests
The Borland librarian actually creates a BADFLAG.obj when the object is
missing the first time!  This causes later tests to not reject it.
Instead use a Borland-specific variation on the flag.
2010-06-02 08:16:06 -04:00
Brad King 6a009280fd Better "bad" flag in LinkFlags test
The Intel C Compiler for Linux ignores _BADFLAG_ when linking!  Use a
flag that looks like a missing object file to ensure its rejection.
2010-06-01 17:46:58 -04:00
David Cole 2deba1b911 Add .zip and .tar.bz2 extraction to ExternalProject.
Add archives of these file types and add to the test
cases covered in the ExternalProject test.

Also add an "Example" directory in the Tests/ExternalProject
directory containing the canonical simplest example of
ExternalProject usage.
2010-05-31 14:30:22 -04:00
Bill Hoffman aa4daa528e change nightly release builds to use next, and move qmake on dash2win64 2010-05-28 17:53:26 -04:00
Brad King fe971d97ca Add STATIC_LIBRARY_FLAGS_<CONFIG> property (#10768)
This is a per-configuration version of STATIC_LIBRARY_FLAGS.
2010-05-28 11:09:10 -04:00
Brad King d3303dbc81 Test LINK_FLAGS and STATIC_LIBRARY_FLAGS (#10768)
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.
2010-05-28 11:01:42 -04:00
David Cole c943ccdbfa Allow return value of 1 from git status. 2010-05-28 10:16:44 -04:00
David Cole 806eaa290c Further refinements to the CheckSourceTree test.
Echo results of calling git status before exiting with
an error. Add one special case so that the test may pass
on the dashmacmini2 continuous dashboard, despite a 'git
status' non-zero return code. More logic like this may
be required. I will re-evaluate based on tomorrow's
nightly dashboard runs.
2010-05-27 16:43:28 -04:00
David Cole 1dd316563a Add git support to the CMake.CheckSourceTree test.
Additionally, output some more information in both cvs
and git cases. When it is a cvs checkout, echo the contents
of CVS/Root and CVS/Repository to the test output. When it
is a git checkout, echo the output of 'git branch -a'.

This will allow us to see more details about any given CMake
source tree right in the CDash results for this test.
2010-05-27 15:44:57 -04:00
David Cole f67139ae6f Improve FILE(DOWNLOAD) and ExternalProject.
Improve FILE(DOWNLOAD ...):

- Add percent complete progress output to the FILE DOWNLOAD
  command. This progress output is off by default to
  preserve existing behavior. To turn it on, pass
  SHOW_PROGRESS as an argument.

- Add EXPECTED_MD5 argument. Verify that the downloaded
  file has the expected md5 sum after download is complete.

- Add documentation for SHOW_PROGRESS and EXPECTED_MD5.

  When the destination file exists already and has the
  expected md5 sum, then do not bother re-downloading
  the file. ("Short circuit" return.)

  Also, add a test that checks for the status output
  indicating that the short circuit behavior is actually
  occurring. Use a binary file for the test so that the
  md5 sum is guaranteed to be the same on all platforms
  regardless of "shifting text file line ending" issues.

Improve ExternalProject:

- Add argument URL_MD5.

- Add verify step that compares md5 sum of .tar.gz file
  before extracting it.

- Add md5 check to download step, too, to prevent
  unnecessary downloads.

- Emit a warning message when a file is not verified.
  Indicate that the file may be corrupt or that no
  checksum was specified.
2010-05-27 12:21:56 -04:00
Brad King 3ebb41d58a Merge branch 'version' 2010-05-17 13:34:29 -04:00
Bill Hoffman aa30bd3f2a Disable purify on unix, as it works differently and ctest can't use it. 2010-05-11 09:30:41 -04:00
Zach Mullen d80323bccd Fix CTestTestScheduler sporadic failure.
Increased the time difference between each test so that overburdened systems won't fail this test sometimes.
2010-05-07 11:16:44 -04:00
Brad King 678073bec2 CTest: Submit author email in Update.xml
Add the <Email>...</Email> element in Update.xml for each commit
reported.  This field was defined by Dart but never really used.
Distributed version control systems use author name and email
instead of a user id, so now it makes sense to use this field.
2010-05-07 09:17:26 -04:00
Brad King 4d653fb4ee Fix 'Architecture' test for more Mac linkers
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.
2010-05-06 14:37:55 -04:00
Brad King 67277bacca Teach ctest_update about Git submodules
Git does not automatically checkout the matching version of a submodule
when it checks out a new version of the parent project in the work tree.
If the submodule reference changed in the parent project then we were
reporting the submodule path as a local modification.  Work around the
problem in ctest_update using "git submodule update" after "git pull".
For projects with no submodules this is a no-op.  See issue #10662.
Also add a submodule to the test project for CTest.UpdateGIT to test the
work-around.
2010-05-04 09:40:04 -04:00
David Cole 2938263636 Fix missing set of MSVC10 and add CheckCompilerRelatedVariables test. 2010-04-30 00:46:24 -04:00
Brad King 0328379411 Report commit hash in CMake development versions
For builds from Git repositories, add "-g<commit>" to the end of the
version number.  If the source tree is modified, append "-dirty".
For builds from CVS checkouts, add "-cvs-<branch>".
2010-04-23 10:01:49 -04:00
Zach Mullen 9676c52c3e Fix for StopTime for cases when gmtime is a day ahead of localtime 2010-03-18 13:53:40 -04:00
Zach Mullen a2fe175647 More debugging of StopTime test 2010-03-18 10:29:02 -04:00
Zach Mullen 91c1a70193 Output times during StopTime test for debugging 2010-03-17 12:32:44 -04:00
Zach Mullen b41647ca8f Move get_date call closer to ctest_test for more predictable results. 2010-03-17 11:10:39 -04:00
Zach Mullen 0ba9d04117 Add the --stop-time argument
Unit test and script hook for STOP_TIME
2010-03-17 11:04:13 -04:00
David Cole a61c5ab6e5 Add CMAKE_TESTS_CDASH_SERVER variable and CTestSubmitLargeOutput test.
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.
2010-03-08 13:25:58 -05:00
Zach Mullen 9d7e08de48 Remove empty_binary_dir command in new unit test 2010-03-03 10:49:21 -05:00
Zach Mullen 2fd9b8072b Add unit test for RESOURCE_LOCK test property 2010-03-03 10:33:09 -05:00
Bill Hoffman ab650f095f Different versions of cygwin report differet messages for cygwin
For cygwin pass the badexe test if either ***Failed or BAD_COMMAND
show up in the output of the test.
2010-02-26 13:45:23 -05:00
Bill Hoffman 0a1ecf197b Change the tag to be master from CVS for release scripts 2010-02-25 14:46:10 -05:00
David Cole b39fe9407e Fix problem with ExternalProject test in in-source builds. 2010-02-17 16:21:41 -05:00
Zach Mullen 1c13f57313 Add a high COST value to BootstrapTest so that it will be scheduled first in parallel ctest executions. 2010-02-11 11:58:04 -05:00
Brad King 2de33ebd58 Make CTest.UpdateCVS robust to some cvs clients
Commit "Teach CTest.Update tests to strongly check entries" (2010-02-09)
started checking Update.xml entries strongly.  This revealed that some
cvs clients report "U CTestConfig.cmake" during update even though the
file did not change and it selects the same revision.  As a result the
test fails with

  Update.xml has extra unexpected entries:

    Updated{CTestConfig.cmake}

We fix the test to tolerate this particular extra entry without failing.
2010-02-10 11:48:09 -05:00
David Cole 10750bff1c Fix configure time error that occurs when there is a backslash in the HOME environment variable. 2010-02-10 11:23:07 -05:00
Brad King 6e7e71e9b9 Teach CTest.UpdateGIT test to fake file timestamp
We wrap the git executable in a shell script that touches one source
file after 'git pull'.  This makes the file newer than the index even
though it has not actually changed.  If CTest does not refresh the index
properly then the test will fail with a bogus modified file.
2010-02-09 13:31:40 -05:00
Brad King 78a5727d49 Teach CTest.Update tests to strongly check entries
Previously these tests just checked for matching file names in the
Update.xml files.  Now we check the update types (Updated, Modified, or
Conflicting) and reject unexpected extra entries.
2010-02-09 13:31:20 -05:00
Zach Mullen c87282ce52 Re-enabled Scheduler test and fixed the underlying problem. 2010-02-03 16:32:26 -05:00
Zach Mullen 4864d48f27 Disable Scheduler test until underlying problem is resolved. 2010-02-03 16:17:02 -05:00
Zach Mullen fe7c4d0c2a Add unit test to ensure that CTestCostData scheduling works correctly 2010-02-03 15:06:29 -05:00
Brad King 3c2ecbe74e Add alternate per-vendor compiler id detection
At least one Fortran compiler does not provide a preprocessor symbol to
identify itself.  Instead we try running unknown compilers with version
query flags known for each vendor and look for known output.  Future
commits will add vendor-specific flags/output table entries.
2010-02-01 09:03:05 -05:00
Brad King 2b3eee4646 Avoid PathScale cmd-line bug in TryCompile test
The PathScale compiler silently accepts unknown options that start in
more than one '-':

  $ touch foo.c
  $ pathcc -c foo.c --junk
  $ echo $?
  0
  $ pathcc -c foo.c ---junk
  $ echo $?
  0
  $ pathcc -c foo.c -junk
  pathcc ERROR parsing -junk: unknown flag
  $ echo $?
  2

We teach the TryCompile to pass a bogus flag with only one '-' instead
of three '-'s for this compiler.
2010-01-25 08:47:32 -05:00
Brad King 4d1351e8d3 Skip Fortran module mangling test on PathScale
We disable this test because PathScale Fortran mangles module symbols as
"MYSUB.in.MYMODULE" so we cannot interface with it from C.  We already
did this for SunPro and MIPSpro.
2010-01-25 08:27:34 -05:00
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
Brad King 3a790251f4 Document and test find_package <pkg>_DIR env var
The find_package(<pkg>) command checks the <pkg>_DIR environment
variable.  This commit documents and tests the feature.
2009-11-04 13:14:57 -05:00
Bill Hoffman 9c12894636 Add missing depend because of registry write with complex name, they can not be done in parallel. 2009-11-03 19:13:40 -05:00
Zach Mullen ec5a70dc91 Increase ctest RunScript line coverage. (Note: NEW_PROCESS argument is currently causing the test to fail, still investigating the reason for this, will add coverage for it later) 2009-10-30 17:43:55 -04:00
Bill Hoffman fb51d98562 Switch to using libarchive from libtar for cpack and cmake -E tar
This allows for a built in bzip and zip capability, so external tools
will not be needed for these packagers.  The cmake -E tar xf should be
able to handle all compression types now as well.
2009-10-30 13:10:56 -04:00
David Cole cabd917460 Fix failed submit test 'failures'... Regular expression now matches [Cc]ouldn't and [Cc]ould not. 2009-10-30 12:08:10 -04:00
Zach Mullen 8612aa10b6 Hook for scheduling tests in a random order
This may help statistically detect implicit dependencies among unit
tests while running in parallel.
2009-10-29 15:30:12 -04:00
Zach Mullen dae1011d26 Fixed CTestTestRunScript 2009-10-29 12:46:00 -04:00
Zach Mullen 8ca41ca7fb Backout RunScript test again... (debugging on faraway) 2009-10-29 10:13:35 -04:00
Zach Mullen 5075c255f7 Fix RunScript test; it should now work on all platforms 2009-10-29 10:00:28 -04:00
Brad King 6eff237c56 Fix OutDir test on HP, MinGW, and Cygwin
The commit "Test per-config OUTPUT_DIRECTORY properties" added this test
with a find_library() call in a CMake script, which requires an explicit
list of possible library prefixes and suffixes.  This commit adds more
suffixes to match the libraries built on HP, MinGW, and Cygwin.
2009-10-29 09:26:17 -04:00
Bill Hoffman 32f156b218 Add more coverage and use the ARGS option of try_run 2009-10-28 23:29:13 -04:00
David Cole 06b0f676ce Increase timeout for the nightly build tests so that the poor mac nightly build on dashmacmini2 might have enough time to complete successfully. Use CMAKE_LONG_TEST_TIMEOUT instead of a hard-coded number for the test TIMEOUT property so that a calling script may adjust it by setting a higher CTEST_TEST_TIMEOUT value. 2009-10-28 15:50:40 -04:00
David Cole b5615e9c34 Increase timeout for the nightly build tests so that the poor mac nightly build on dashmacmini2 might have enough time to complete successfully. Allow for up to 3 hours. After measuring successful runs for a few weeks, perhaps we can use a lower value. 2009-10-28 15:41:52 -04:00
David Cole 640389f3a4 Avoid failure of CPackComponents test on dash16 and dash17 since makensis was installed on those machines to increase coverage. Do not add install rules with absolute paths when makensis is going to be used to build an installer. 2009-10-28 14:40:01 -04:00
Zach Mullen 285c731f0e Deleted old RunScript cmake scripts (renamed) 2009-10-28 14:12:03 -04:00
Zach Mullen 5eb4372001 Changed RunScript test to be in-source build safe 2009-10-28 14:11:19 -04:00
Brad King 28c3d59ed9 Test per-config OUTPUT_DIRECTORY properties
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.
2009-10-28 13:35:53 -04:00
Brad King 23bdb28cad Create CMake.ELF test to cover cmELF further
This commit adds a CMake.ELF test to exercise cmELF and file(RPATH_*).
We test all combinations of 32/64-bit and LSB/MSB binaries.
2009-10-27 14:01:31 -04:00
David Cole ae1e9900fa Add test CMakeTestBadCommandLines. Also add --graphviz arg to cmake invoked during the CPackComponents test. The purpose of each is to increase coverage of cmake.cxx. 2009-10-27 12:18:41 -04:00
Brad King 2e48fe0eec Avoid Intel linker crash in BuildDepends test
The BuildDepends test exercises incremental linking with MSVC and Intel
tools on Windows.  In some cases the Intel compiler creates objects that
cause the MS linker it invokes to crash during incremental linking.  We
avoid the problem for this test by disabling incremental linking.
2009-10-27 11:31:40 -04:00
Brad King 6bf98dba01 Test if() boolean coersion and CMP0012 behaviors
We introduce the "CMake.If" test to try out conversion of constants and
variables to boolean values in the if() command.  We cover both OLD and
NEW behavior for policy CMP0012.
2009-10-27 09:08:12 -04:00
David Cole 20fe27cda1 Add test to enable detecting differences between generation N and N+1 of a cmake generated build tree. Theoretically, each generation run with exactly the same arguments should be identical to the previous generation... Practically, there are differences. This is a tool to help us measure those differences. For now, the test always succeeds. Eventually, we may add the code to make it fail when there are differences. 2009-10-26 16:09:27 -04:00
Zach Mullen 857b5dc9f5 Disable run_script test for now, it is failing currently on linux 2009-10-26 14:37:37 -04:00
Zach Mullen 6e3dd78b8b Added test coverage for cmCTestRunScriptCommand 2009-10-26 13:10:46 -04:00
Brad King 7b10ec686f Skip SHARED lib Fortran test with XL and old GNU
The commit "Test all target types in Fortran" enabled a SHARED library
in the Fortran test.  However, we do not yet implement support for
shared libraries with XL Fortran (it seems this requires using the C
compiler to link).  Furthermore, the old g77 2.97 from Red Hat does not
support shared libs on Itanium because the g2c lib is not -fPIC.

For now we just disable SHARED libs in the test for these tools.
2009-10-26 11:32:19 -04:00
Brad King 707d05e936 Fix Intel and MinGW Fortran DLL import libraries
We add Intel and MinGW Fortran linker options to create the import
library portion of a DLL.  This allows other binaries to link to a
Fortran DLL.

We also update the Fortran test to use a .def file to specify exports
since there is no __declspec(dllexport) markup syntax in Fortran.
2009-10-26 11:07:27 -04:00
Zach Mullen 99697308f3 Add a ctest test to cover cmCTestBatchTestHandler. Since its behavior isn't fully defined yet, we just run it as is and don't care much about the result. 2009-10-26 09:44:08 -04:00
David Cole 62f80415a9 Turn on the NSIS binary for the CPackComponents test if NSIS is found. Should increase coverage of the NSIS generator on the dash16 coverage dashboard. 2009-10-25 17:00:51 -04:00
Brad King eb3d02e351 Test all target types in Fortran
This teaches the Fortran test to try all basic target types (archive,
shared lib, exe) with Fortran-only sources.
2009-10-23 08:24:51 -04:00
David Cole 57214662ae Add test of all cmake -G generators. Ignore any errors from this as not all generators are expected to be usable on all machines. Help to increase coverage of the various generators and cmake.cxx itself. 2009-10-22 10:14:40 -04:00
Brad King aaabb2fdc2 More verbose BuildDepends test output
We teach BuildDepends to always print the output from each try_compile.
This may make debugging easier.
2009-10-22 09:35:58 -04:00
Brad King e4897a78b9 Test OSX_ARCHITECTURES target property
We test the property with a project that fails to link due to an
architecture mismatch between an executable and a static library.

See issue #8725.
2009-10-21 13:01:17 -04:00
David Cole 8d94703cc2 Fix failing test. Forgot to double quote last arg to STRING. 2009-10-20 15:18:45 -04:00
David Cole e1458ae4ab Add test of all available CPack generators. Add this test with the goal of increasing coverage of the cpack source code, even/especially when the underlying packager tool is not installed. The test does not fail if there is a cpack problem with a certain generator. I expect some generators will fail on every machine running a CMake dashboard. 2009-10-20 14:31:10 -04:00
Zach Mullen 78174651b6 Added a ctest add_subdirectory test which fails before my patch made earlier today. 2009-10-20 13:35:44 -04:00
David Cole ac170b1df6 Remove the rpath_remove_file_is_not_executable test case. It fails on Windows, but passes on Linux. Put back later after addressing inconsistency. 2009-10-17 12:12:07 -04:00
David Cole 16d995d728 Fixed issues with message text in FILE command error situations. Added many new test cases to increase the coverage of the FILE command even further. 2009-10-17 11:43:15 -04:00
David Cole a65b1cc3b0 Add more testing coverage of the FILE command. 2009-10-16 15:07:41 -04:00
David Cole 402fa2ceeb Allow test to pass even if an expected-to-fail submit claims 'Submission successful' - apparently when there is a valid HTTP_PROXY involved, our submitting to an empty drop location appears to succeed. Presumably, the proxy simply takes it like a man, and then discards it... 2009-10-16 11:47:51 -04:00
Alexander Neundorf 7e53bcc115 add a test which checks that cmake can build the latest stable KDE4 (kdelibs) release
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
2009-10-15 18:18:23 -04:00
David Cole 680fae9c97 Increase ctest coverage. Introduce optionally on intentional compile errors and warnings to the SmallAndFast project. Turn them on for the FailedSubmit tests to cover analyzing LABELS-related errors and warnings. 2009-10-15 12:35:54 -04:00
David Cole d03c6d970f Use LABELS in some ctest_coverage calls to increase coverage in cmCTestCoverageHandler.cxx. 2009-10-15 12:07:14 -04:00
David Cole f1e6726668 Add LABELS to the SmallAndFast test project to increase coverage of ctest code that is only invoked when labels are present. 2009-10-15 11:51:13 -04:00
David Cole 886ae02356 Fix crash on Windows. Remove trailing white space from regex. These changes should correct all failures of the new FailedSubmit tests. 2009-10-15 07:38:51 -04:00
David Cole e3dec97333 Add another possible error message that curl might emit with an empty drop location. 2009-10-14 15:02:16 -04:00
David Cole a85ac1a734 Use macro instead of function since DASH2 continuous dashboard still uses CMake 2.4.8 to drive the dashboard. Add clarifying comments so that a future developer does not delete seemingly unused variables: they are used: inside the input to the configure_file call. 2009-10-14 14:18:47 -04:00
David Cole 2137955138 Increase ctest coverage. Add tests that intentionally call ctest_submit without any drop location so that the submits fail. Call for each possible type of submit. Also use the launchers from these scripts. 2009-10-14 13:32:46 -04:00
David Cole c16ac1a31d Reduce duration of ctest_sleep arguments. Add SmallAndFast project. Replace kwsys with SmallAndFast to make CTestTest faster. (I will keep an eye on coverage results after this commit and make sure we still have equivalent ctest coverage.) 2009-10-08 12:17:03 -04:00
Brad King 0653286dc6 Split Borland compiler information files
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.
2009-10-08 11:56:07 -04:00
Brad King 7dcfc8d23a Make Complex test of CMakeLib more optional
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.
2009-10-07 16:11:52 -04:00
Brad King 71910b3fd4 Fix find_package() when <pkg>_DIR is wrong
When <pkg>_DIR is set to an incorrect version we search again and store
the result in the variable, even if it is <pkg>_DIR-NOTFOUND.

There was a bug in the case when the new search does not find anything
and the old value came from a cache entry with UNINITALIZED type.  The
command used to try to load a package configuration file from the last
place searched, and would leave the old wrong value in the entry.  This
commit fixes the behavior to avoid trying to load a missing file and to
set the value to <pkg>_DIR-NOTFOUND as expected.
2009-10-07 14:37:30 -04:00
Brad King fff1c6d275 More robust implicit link line detection regex
The regex used by CMAKE_PARSE_IMPLICIT_LINK_INFO to detect link lines
should not match lines that happen to have ".../ld.../..." in them.  A
linker name should match only as the last component of a path.

See issue #9666.
2009-10-07 08:43:51 -04:00
David Cole a6facbcca3 Use the correct CMake (the freshly built one) to drive the CMakeWizardTest. 2009-10-07 06:33:09 -04:00
Brad King b9850a614e Log implicit link information parsing actions
This commit teaches the CMAKE_PARSE_IMPLICIT_LINK_INFO function to log
its actions.  We store the log in CMakeFiles/CMakeOutput.log at the top
of the project build tree.  This will make diagnosis of implicit link
information parsing problems easier.
2009-10-06 15:16:12 -04:00
David Cole 5b74d031db Increase coverage. Intentionally trigger error conditions. Call all the else*/end* functions without proper opening or containing code structure: else, elseif, endforeach, endfunction, endif, endmacro, endwhile. 2009-10-06 14:45:19 -04:00
David Cole d8efcfc787 Increase coverage. Add test of class cmakewizard. (cmake -i 'mode') 2009-10-06 13:27:13 -04:00
Brad King d4342e8ae7 Fortran test: Match config for external project
In the Fortran test we use a custom command to build another Fortran
project internally.  The project provides a Fortran module and library
to which to link.  This commit teaches the test to build the extra
project using the same build configuration as the main project.
2009-10-05 16:51:11 -04:00
David Cole b3611f70ae Add tests for uncovered bits of the math and cmake_minimum_required cmake functions. 2009-10-05 16:50:21 -04:00
Brad King 58a616dea3 Fix Preprocess test for Intel on Windows
We need to leave out the '%' character from tests with the Intel
compiler.  Since '%' needs to be written '%%' in NMake when not using a
response file but just '%' when using a response file, we just skip the
character for now.  It works with MSVC in NMake only because that
compiler expects '%%' inside response files, which do get used.
2009-10-05 14:39:28 -04:00
Brad King f1b7e620f7 Fix ModuleDefinition test for Intel on Windows
CMake defines MSVC only for a VS compiler, but the Intel compiler adds
the preprocessor definition _MSC_VER.  Instead of relying on separate
tests to decide whether to use example_dll_2, we do one test in CMake
and then add our own preprocessor definition.
2009-10-05 14:39:23 -04:00
Brad King 667f0724a8 Fix PrecompiledHeader test for Intel on Windows
This commit updates the test's sanity check to allow Intel too.
Previously it refused to run on non-MSVC compilers.
2009-10-05 14:39:14 -04:00
Brad King 750eb105c2 Test target link information invalidation
We test this by adding export(TARGETS) to the LinkLanguage test to
export the executable before the library is linked to it.  Since
export(TARGETS) computes the link interface of the target (so that it
can export it), this ensures that the information is recomputed after
the link library is added.
2009-10-05 09:07:09 -04:00
Bill Hoffman 1bc355b711 Use new style header generation and get rid of OBJECT_DEPENDS in tutorial 2009-10-04 22:55:02 -04:00
David Cole 517e1e3c0f Add a few more cases to the new StringTest for even better coverage. Re-factor the scripts to make it easier to add new cases to this test. Re-factoring also enables the test driver in ExecuteScriptTests to be re-used when adding new tests in the future. 2009-10-03 12:01:10 -04:00
David Cole 837364cb04 Correct some typos in error messages in the string command. Add a test that covers more of the code implemented in cmStringCommand.cxx, especially the error handlers. 2009-10-02 14:51:43 -04:00
Brad King b4ace1cca0 Test INTERPROCEDURAL_OPTIMIZATION build feature
This creates an "IPO" test that builds some other tests as subdirectories
while enabling INTERPROCEDURAL_OPTIMIZATION.  See issue #9615.
2009-10-02 13:52:29 -04:00
Brad King 62edb7b943 Better CMake.ModulesNotice test regex
This commit updates the copyright notice regex to enforce a more strict
format for contributor copyrights.
2009-10-01 14:22:58 -04:00
Brad King 26efeadd22 New CMake.ModulesNotice test for copyright notices
This new test checks Modules/*.cmake for the required copyright notice.
2009-10-01 14:12:19 -04:00
Zach Mullen cc8c4a3f4f Improved safety and removed busy waiting from the CTestTestTimeout test. 2009-09-30 14:48:40 -04:00
Brad King 0db2c8505e Test use of module .def files for MS tools
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.
2009-09-29 16:39:43 -04:00
Zach Mullen f321dbb17b ENH: Added ctest test coverage for a test timeout 2009-09-29 15:18:46 -04:00
Zach Mullen bcb127d494 Remove ctest_submit from CTestTestParallel 2009-09-29 14:21:48 -04:00
Brad King 65a78ec5b8 Test support for OLD behavior of policy CMP0002
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.
2009-09-28 17:34:34 -04:00
David Cole 8562f5400d Oops. Last commit did not create subdir before doing a touch on a file in it. So it fails on some platforms. This fixes that. 2009-09-25 13:36:08 -04:00
David Cole f199385605 Fix CMake Internal Error from cmTarget::GetOutputInfo - triggered by calling GetLocation on a utility target - caused by custom command output file with same name as custom target. The fix is to avoid calling GetLocation unless the target is of a type that is expected to have a location... 2009-09-25 13:23:19 -04:00
Bill Hoffman 815ec522ee SEGFAULT does not work on watcom with ctest, so don't expect it to... 2009-09-24 14:14:23 -04:00
Bill Hoffman 8c4f69c45b Use CTEST_TEST_GENERATOR 2009-09-24 13:43:25 -04:00
Bill Hoffman 205855bf56 Make sure CTestTest scripts honor the CMAKE_TEST_GENERATOR so that if the generator to build cmake is different than the one used for tests (watcom) is used. 2009-09-24 13:18:49 -04:00
Bill Hoffman dccbbe0a99 Visual Studio 10 has the same bug as 8 so make the path shorter 2009-09-23 16:10:31 -04:00
Zach Mullen d33701abbb Uncommented the dependency of CTestTestNoExe on CTestTestNoBuild so that it will work in parallel now. 2009-09-23 14:13:33 -04:00
Zach Mullen 8ffc8147e0 Make portable c for Parallel test 2009-09-23 14:07:57 -04:00
Bill Hoffman fc921a021c Add nightly builds for linux windows and mac. 2009-09-23 12:45:39 -04:00
Zach Mullen f3dce87e6d Set new ctest tests to always run, whether CTEST_TEST_CTEST is enabled or not. Changed parallel test to be portable. 2009-09-23 11:38:37 -04:00
Zach Mullen 6f45c1d88c CTestTestParallel now submits to public dashboard for easier debugging 2009-09-23 09:00:37 -04:00
Brad King e55bbab88b Teach Xcode generator to set XCODE_VERSION
We set the variable 'XCODE_VERSION' in the CMake language to the Xcode
version string (e.g. "3.1.2").  Platform config files may use it later.
2009-09-23 08:48:39 -04:00
Zach Mullen 664a409ae0 Added tests for ctest parallel options (PARALLEL_LEVEL, PROCESSORS, RUN_SERIAL) 2009-09-22 12:06:03 -04:00
Bill Hoffman a89bedfc6e For the complex tests since they link to the CMake library make sure that they are built with the type of build. 2009-09-21 15:26:59 -04:00
Zach Mullen e4293b4b38 Re-enabled failing tests; fixed ctest_build output to be consistent in the error condition across different make programs so that these tests would pass. 2009-09-21 13:40:40 -04:00
Bill Hoffman cabca8d903 Disable test as it fails on every system. 2009-09-20 09:42:09 -04:00
Zach Mullen 7b0e7f714b Disabling CTestTestNoBuild pending investigation of odd g++ output issues. 2009-09-18 15:01:13 -04:00
Zach Mullen 3c32c904b3 Apparently, on FarAway the presence of errors during ctest_build does not cause the calling ctest to return an error condition. 2009-09-18 14:02:14 -04:00
Zach Mullen a35f11b13e Cosmetic change to test CMakeLists 2009-09-18 13:34:24 -04:00
Zach Mullen 78e0bfa0fd Added test coverage for ctest. Covers WILL_FAIL condition, tests that do not build, tests that segfault, and test executable not found (bad command), as well as some pass and fail regular expressions. 2009-09-18 12:16:46 -04:00
Brad King 997ae66cbb Fix CHECK_(C|CXX)_COMPILER_FLAG macro test
The flag "-_this_is_not_a_flag_" was not rejected by GCC 4.0 on older
Mac OS X.  We now use "---_this_is_not_a_flag_" instead, which will
hopefully be rejected by all compilers.
2009-09-18 09:49:51 -04:00
Brad King 42857c747e Test CHECK_(C|CXX)_COMPILER_FLAG macros
This teaches the TryCompile test to check that the compiler flag check
macros correctly reject a bad flag.  See issue #9516.
2009-09-17 15:33:12 -04:00
Brad King 229b67a249 Create CMake.ConfigureFile test for configure_file
This test checks that configure_file() handles input and output file
arguments as documented.
2009-09-16 15:09:58 -04:00
Brad King d23d268e39 Factor out CMake.File test result check for re-use
The CMake.File test runs several scripts through "cmake -P" and checks
the output and result against known good values.  This commit factors
out the checking code into a separate CMakeCheckTest module.  The module
may be used by new tests.
2009-09-16 15:09:10 -04:00
Brad King 33207a9a87 Test add_subdirectory inside function
This commit teaches the FunctionTest to check variable scope behavior
when a subdirectory is added inside a function call.  Any PARENT_SCOPE
sets in the subdirectory should affect only the function scope which
called add_subdirectory and not its parent scope.
2009-09-16 09:52:04 -04:00
Brad King 2541f30287 Test that CTest can handle missing newlines
We create test 'CTest.NoNewline' to print output with no newline.
This tests CTest's ability to handle a missing newline.
2009-09-11 16:39:07 -04:00
Brad King 14b12d0355 Enable C and C++ first in Fortran test
CMake now looks for a Fortran compiler matching any C or C++ compiler
already enabled.  We test this by enabling C and C++ first in the
Fortran test, which is what user projects will likely do.
2009-09-09 16:39:53 -04:00
David Cole 002ae925c3 Use more verbose/descriptive names for the "public API" functions in the ExternalProject.cmake module. Follow the cmake function naming convention, using a ModuleFileName_ prefix. Locate stamp files under a CMAKE_CFG_INTDIR subdir of the stamp dir so that debug and release builds have separate stamp files for Visual Studio builds. If no CMAKE_GENERATOR argument is given to ExternalProject_Add, default to using the parent project's cmake generator. 2009-09-08 15:37:15 -04:00
Brad King 4e16813f63 Put custom commands in topological order for VS 10
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.
2009-09-07 10:12:18 -04:00
Alexander Neundorf f5bcc82b13 Add a test for FILE(READ ... HEX) together with a tiny binary file.
Alex
2009-09-06 10:26:24 -04:00
David Cole 5624be360e Add test step to ExternalProject builds. Rename SVN_TAG to SVN_REVISION since it is a more accurate name. 2009-09-03 12:11:14 -04:00
Zach Mullen 659171d1f7 ENH: Added PARALLEL_LEVEL option for ctest_memcheck(). Added PROCESSORS option to set_tests_properties (implementation to come). 2009-09-03 10:47:14 -04:00
Brad King 06332c883f Make CTest.UpdateGIT robust to user git config
Part of this test does "git pull" on a dirty work tree.  We need to make
sure that 'branch.master.rebase' is false for the test repository.
Otherwise if it is true in the user configuration then pull will refuse
to rebase and the test will fail.
2009-09-01 15:41:43 -04:00
Brad King 07f029d6ef Test the user package registry
We teach the FindPackageTest to build a sample project that stores its
build tree in the user package registry using export(PACKAGE), and then
find it with find_package.
2009-09-01 14:05:42 -04:00
Brad King d259128894 Test link multiplicity export/import
We test that LINK_INTERFACE_MULTIPLICITY propagates through export() and
install(EXPORT) into dependent projects.  A simple cycle of two archives
that need to be scanned three times ensures that the importing project
uses the multiplicity correctly.
2009-09-01 10:38:36 -04:00
Brad King 0cfd8c411f Test link multiplicity
This tests the LINK_INTERFACE_MULTIPLICITY property for a cycle of three
static libraries that must be scanned three times to link properly.
2009-09-01 10:38:03 -04:00
Zach Mullen b427d1985e Added ctest -N test. Fixed ctest working directory bug. MemCheck fix coming soon... 2009-08-28 11:08:39 -04:00
Brad King 6e7020b452 Enforce FortranCInterface_VERIFY in Fortran test
This removes the QUIET option from FortranCInterface_VERIFY in the
Fortran test to really test the detected interface everywhere.
2009-08-24 13:07:43 -04:00
Brad King a9be85da2e Create FortranCInterface_VERIFY function
This function builds a simple test project using a combination of
Fortran and C (and optionally C++) to verify that the compilers are
compatible.  The idea is to help projects report very early to users
that the compilers specified cannot mix languages.
2009-08-24 08:49:35 -04:00
Bill Hoffman b7e3146275 Output command that failed, if it fails. 2009-08-11 22:01:49 -04:00
Brad King 875c478b64 Test add_test() generator expressions
This teaches the 'testing' test to try generator expressions in
arguments to add_test(NAME).  This test case mimics a common use-case of
passing executables to test driver scripts.  We excercise the syntax for
per-configuration target file names.
2009-08-11 09:56:02 -04:00
Brad King 80f0201b37 Rewrite FortranCInterface module
This is a new FortranCInterface.cmake module to replace the previous
prototype.  All module support files lie in a FortranCInterface
directory next to it.

This module uses a new approach to detect Fortran symbol mangling.  We
build a single test project which defines symbols in a Fortran library
(one per object-file) and calls them from a Fortran executable.  The
executable links to a C library which defines symbols encoding all known
manglings (one per object-file).  The C library falls back to the
Fortran library for symbols it cannot provide.  Therefore the executable
will always link, but prefers the C-implemented symbols when they match.
These symbols store string literals of the form INFO:symbol[<name>] so
we can parse them out of the executable.

This module also provides a simpler interface.  It always detects the
mangling as soon as it is included.  A single macro is provided to
generate mangling macros and optionally pre-mangled symbols.
2009-08-05 13:40:29 -04:00
Brad King 87442aefb0 Remove WXDialog source code
The QtDialog is our supported cross-platform GUI, so the WXDialog source
is no longer needed.
2009-08-05 10:15:30 -04:00
Brad King 80c947b397 No /fast targets in try_compile project mode
The try_compile command builds the cmTryCompileExec executable using the
cmTryCompileExec/fast target with Makefile generators in order to save
time since dependencies are not needed.  However, in project mode the
command builds an entire source tree that may have dependencies.
Therefore we can use the /fast target approach only in one-source mode.
2009-08-04 14:37:46 -04:00
Brad King f3cd1e06f5 Test C, C++, Fortran interface combinations
Previously the Fortran test created a single executable containing C,
C++, and Fortran sources.  This commit divides the executable into three
libraries corresponding to each language, and two executables testing
Fortran/C only and Fortran/C/C++ together.  The result tests more
combinations of using the languages together, and that language
requirements propagate through linking.
2009-08-04 14:06:45 -04:00
Brad King 73de2362dd Fix recursive try_compile calls
When building an entire source tree with try_compile instead of just a
single source file, it is possible that the CMakeLists.txt file in the
try-compiled project invokes try_compile.  This commit fixes propagation
of language-initialization results from the outer-most project into any
number of try-compile levels.
2009-08-03 13:37:36 -04:00
Brad King 1a159bbf33 Test try_compile project mode
The try_compile command project mode builds an entire source tree
instead of one source file.  It uses an existing CMakeLists.txt file in
the given source tree instead of generating one.  This commit creates a
test for the mode in the TryCompile test.
2009-08-03 13:37:28 -04:00
Brad King 2537a72f8e Check PGI linker lines in ImplicitLinkInfo test
This adds sample linker invocation lines for the PGI compiler on Linux.
2009-07-29 16:38:12 -04:00
Brad King f47ae0599d Check Intel linker lines in ImplicitLinkInfo test
This adds sample linker invocation lines for the Intel compiler on
Linux.  In particular, this exercises the case when "ld" appears without
a full path.
2009-07-29 16:07:33 -04:00
Brad King 819b0742c6 Test cache entry property "STRINGS"
The STRINGS property tells cmake-gui to create a drop-down selection
list.  This teaches the Properties test to set and verify its value.
2009-07-29 08:39:50 -04:00
Brad King 836447663e BUG: Parse implicit link editor -z*extract options
The Sun Fortran compiler passes -zallextract and -zdefaultextract to the
linker so that all objects from one of its archives are included in the
link.  This teaches the implicit options parser to recognize the flags.
We need to pass them explicitly on C++ link lines when Fortran code is
linked.
2009-07-28 08:36:11 -04:00
Brad King 2b849a77a6 ENH: Test Fortran and C++ in one executable
This extends the Fortran-to-C interface test to add a C++ source file.
The executable can only link with the C++ linker and with the proper
Fortran runtime libraries.  These libraries should be detected by CMake
automatically, so this tests verifies the detection functionality.
2009-07-27 12:43:42 -04:00
Brad King 1c98cdf224 ENH: Remove EXTRA_FORTRAN_C_LIBS Fortran test hack
This hack was created to help the Fortran test executables link to the
implicit C libraries added by BullsEye.  Now that implicit libraries
from all languages are detected and included automatically the hack is
no longer needed.
2009-07-27 12:43:27 -04:00
Brad King 0afa7a95f2 ENH: Report CMake logs in SystemInformation test
This teaches the SystemInformation test to report the CMake log files
CMakeOutput.log and CMakeError.log from the CMake build tree and from
the SystemInformation test build tree.  These logs may help diagnose
dashboard problems remotely.
2009-07-27 12:35:12 -04:00
David Cole 7ae028eb33 ENH: Make the CheckSourceTree test emit a warning (but pass instead of fail) when there is an in-source build on a dashboard machine. 2009-07-27 12:04:03 -04:00
Brad King 38d1ff59da ENH: Require language libs in Fortran/C test
This extends the Fortran/C interface test to require that the executable
link to the fortran language runtime libraries.  We must verify that the
proper linker is chosen.
2009-07-27 11:56:09 -04:00
David Cole 32be77df8c ENH: Improvements to the new CheckSourceTree test: ignore Thumbs.db and .DS_Store files. Force all output to stderr by not using STATUS with message. Better error text. 2009-07-25 13:32:07 -04:00
Brad King 55718eb869 BUG: Further avoid ImplicitLinkInfo case change
The commit "Avoid case change in ImplicitLinkInfo test" did not change
all of the paths to mingw, so some case change still occurs.  This
changes more of them.
2009-07-25 08:11:57 -04:00
David Cole c84255d703 BUG: One last attempt for today to get the new CheckSourceTree test running on dashboards driven by CMake 2.4... Good night now. 2009-07-24 18:30:00 -04:00
David Cole 6414fa21fe BUG: Close endif statements with same string as if so that it still configures with CMake 2.4. One more time. Encore, encore. 2009-07-24 17:28:54 -04:00
David Cole 6237c6ead4 BUG: Improve CheckSourceTree test so that it ignores 'U ' output from cvs update. Also: improve failure logic for dashboard runs and developer runs. 2009-07-24 17:12:37 -04:00
Brad King d958105afb BUG: Teach VariableWatch test to check results
Previously this test was only a smoke test for manual verification.
This teaches the test to actually check that the variable watch
succeeds.
2009-07-24 16:57:38 -04:00
David Cole e0461bbcbc BUG: Close endif statements with same string as if so that it still configures with CMake 2.4 -- also check for existence of FindCVS.cmake before doing find_package(CVS QUIET) also for CMake 2.4 sake... 2009-07-24 16:31:33 -04:00
David Cole b819ee85c0 BUG: Oops. Left chunk of junk at the bottom of the main Tests CMakeLists.txt file with the last commit... Sorry. 2009-07-24 16:15:10 -04:00
David Cole 5bea9620dc BUG: Additional fix necessary for issue #8481 so that Xcode builds do not write files into the source tree. Also add a test that runs last to check for local modifications in CMake_SOURCE_DIR based on whether 'cvs -q -n up -dP' output is empty. Test fails on dashboard runs when there are local modifications. Test passes on non-dashboard runs with local modifications so that CMake developers may have mods when running the test locally. 2009-07-24 15:58:23 -04:00
Brad King e981dc99f5 BUG: Avoid case change in ImplicitLinkInfo test
Since "get_filename_component(... ABSOLUTE)" retrieves the actual case
for existing paths on windows, we need to use an obscure path for mingw.
Otherwise the test can fail just because the case of the paths changes.
2009-07-24 07:34:03 -04:00
Brad King c98aaceb92 ENH: Create ImplicitLinkInfo test
This tests the internal CMakeParseImplicitLinkInfo.cmake module to
ensure that implicit link information is extracted correctly.  The test
contains many manually verified examples from a variety of systems.
2009-07-23 10:07:39 -04:00
Brad King 07ea19ad1f ENH: Implicit link info for C, CXX, and Fortran
This teaches CMake to detect implicit link information for C, C++, and
Fortran compilers.  We detect the implicit linker search directories and
implicit linker options for UNIX-like environments using verbose output
from compiler front-ends.  We store results in new variables called

  CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES
  CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES

The implicit libraries can contain linker flags as well as library
names.
2009-07-23 10:07:25 -04:00
Brad King 267085f338 ENH: Improve strictness of Function test
The command "set(... PARENT_SCOPE)" should never affect the calling
scope.  This improves the Function test to check that such calls in a
subdirectory scope affect the parent but not the child.
2009-07-22 13:42:27 -04:00
Brad King 924dd34451 BUG: Fix SystemInformation dump output
When this test was renamed from DumpInformation to SystemInformation the
configured header that points the dump executable to the directory
containing information files was broken.  No information has been dumped
by this test for 2 years!  This fixes it.
2009-07-21 10:56:31 -04:00
Bill Hoffman 0902d2918e ENH: set expected failure for tests 2009-07-20 10:58:50 -04:00
Bill Hoffman 3d1c12b802 ENH: remove INCLUDE_EXTERNAL_MSPROJECT name hack, and use target properties instead, fix VXExternalInclude test for VS10 2009-07-14 14:16:46 -04:00
Brad King b23b1800a5 ENH: Teach separate_arguments() to parse commands
This adds UNIX_COMMAND and WINDOWS_COMMAND modes to the command.
These modes parse unix- and windows-style command lines.
2009-07-14 10:15:47 -04:00
Brad King b44413f9f8 COMP: Shorten ExportImport test command lines
The ExportImport test drives its Export and Import projects using the
same compiler and flags.  This converts the ctest --build-and-test
command lines to use an initial cache file instead of passing all
settings on the command line.

We need a shorter command line to pass through VS 6 on Win98.
This approach reduces duplicate code anyway.
2009-07-14 08:38:24 -04:00
Bill Hoffman 11d42b3e8f ENH: almost all tests passing in vs 10, commit fixes preprocess and starts vs external project 2009-07-13 16:58:24 -04:00
Brad King 61367c69d7 COMP: Fix ExportImport testLib6 on VS6
The compiler does not support multiple source files differing only by
extension in one target.  This renames the C source file in the test.
2009-07-13 09:20:36 -04:00
Alexander Neundorf 0429853f1b BUG: disable the test for now, will make it work correctly later
Alex
2009-07-12 14:52:31 -04:00