Commit Graph

407 Commits

Author SHA1 Message Date
Brad King 729db484ef Fix ArgumentExpansion test expected results
Teach the ArgumentExpansion test to expect flattened lists as has always
been the case in the CMake language.  Now that the test should pass
enable the failure regex even when CMAKE_STRICT is not on.  Replace the
reference to the old ArgumentExpansion test behavior in the workaround
comment in cmMakefile::TryCompile with a full inline explanation.
2011-01-11 17:10:28 -05:00
Brad King 7decc70eea Merge topic 'build_nightly_from_nightly_branch'
faf1c1e Change the nightly tests to build from the nightly branch and not next.
2011-01-11 15:52:52 -05:00
Brad King af94289f5a Merge topic 'fix-11461-add-midl-vs10'
e33cbda VSMidl Test: Use correct include_directories with VS6 (#11461)
262da91 Prohibit space in HOME value for VSMidl test.
13caaa3 VS10: Finish Midl support (#11461)
2011-01-11 15:51:08 -05:00
David Cole 42b26ee5db ExternalProject Test: Increase test timeout value
Previously, it was hard-coded at 1000 seconds. Now it uses
the value of CMAKE_LONG_TEST_TIMEOUT, which has a minimum
value of 1500 seconds, but might have a longer value depending
on the CTEST_TEST_TIMEOUT value of the driving dashboard.

This should help avoid test failures on overloaded dashboard
machines where it really does take that long to finish the
test successfully.
2011-01-11 15:24:50 -05:00
Richard Bateman 5457b8254c Add support for CFBundle targets on the Mac (#11295)
This commit enables building, for example, plugin bundles
to be loaded by web browsers.
2011-01-11 12:54:44 -05:00
Bill Hoffman faf1c1e49f Change the nightly tests to build from the nightly branch and not next.
This will make sure that the nightly test matches the dashboard nightly section.
When it was next, it used next from when the test was run.
2011-01-07 13:50:36 -05:00
David Cole 13caaa3eb7 VS10: Finish Midl support (#11461)
This commit addresses all of the following:
  http://public.kitware.com/Bug/view.php?id=8165
  http://public.kitware.com/Bug/view.php?id=10687
  http://public.kitware.com/Bug/view.php?id=11311
  http://public.kitware.com/Bug/view.php?id=11461

With this commit, the midl support for VS10 is as
complete as midl support ever was for VS9 and earlier.
The VSMidl test should run on all Visual Studio
generator based dashboards.

CMake no longer sends C++ compiler /D flag values
to the midl compiler in Visual Studio generated
projects. I think if we want to add that in the
future, we should add a way to pass midl compiler
specific flags and perhaps an optional way to add
in the C++ definitions, too. For now, not sending
them along gets past the immediate problem wherein
idl files in a CMake VS generated project just didn't
work at all.

The VSMidl test added in this commit was inspired by
the patch attached to 8165.

The test had to be modified such that it will run in
a directory whose name contains no spaces. There is an
existing bug filed against VS10's midl asking Microsoft
to fix that problem. But for now, the test added in this
commit works by copying the source directory to a location
that avoids spaces in the directory names.

Inspired-By: Robert Lenhardt
2011-01-05 10:37:14 -05:00
Brad King d04e10dd7e Merge topic 'negative-test-costs'
6b0c7de Support explicitly set test costs in non-parallel testing.
2011-01-04 15:46:16 -05:00
Brad King 70950edde0 Merge topic 'honor-explicit-zero-timeout'
51bb493 Test TIMEOUT property explicitly set to zero should be honored
2011-01-04 15:46:07 -05:00
Brad King 45b61209f9 Merge topic 'vs-force-multiple-include'
b29eadd Map multiple /FI flags for VS < 10 (#11649)
2011-01-04 15:45:51 -05:00
Brad King 3556ab9f72 Merge topic 'add_support_for_windres'
971692c Build enable_language command during bootstrap
960ace1 Add testing for windows resources for mingw/msys/cygwin and remove for watcom.
060d6e8 Add support for windres to cygwin.
b2f308c Add support for windows resources with mingw/msys.
2011-01-04 15:44:07 -05:00
Brad King f1d7a5600f Merge topic 'add_preprocessor_def_vs2010_resources'
8c7b19d Only run resource test for MSVC compilers.
753e208 Disable incremental testing for this test, it crashes vs9 linker.
16e7d4b Add flags to resource builds on vs 2010 with a test.
2011-01-04 15:44:01 -05:00
Zach Mullen 51bb493574 Test TIMEOUT property explicitly set to zero should be honored 2011-01-03 14:41:25 -05:00
Zach Mullen 6b0c7ded57 Support explicitly set test costs in non-parallel testing. 2011-01-03 11:25:46 -05:00
Brad King b29eadd8f3 Map multiple /FI flags for VS < 10 (#11649)
The /FI flag may be repeated so the flag table entry needs to be marked
with SemicolonAppendable.  This was already the case for VS 10.
2011-01-03 10:02:16 -05:00
Brad King 97c5171d6c Merge topic 'dev/add_test-working-directory'
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
2010-12-28 15:25:49 -05:00
Bill Hoffman 960ace1e0b Add testing for windows resources for mingw/msys/cygwin and remove for watcom.
This commit should test windows resources on all platforms where they are
supported now.
2010-12-28 10:58:20 -05:00
Bill Hoffman 8c7b19d35e Only run resource test for MSVC compilers. 2010-12-22 16:14:37 -05:00
Brad King 7a7a2cbd31 Merge topic 'ctest-depend-cycle'
1f7133c CTest: Fix line-too-long style in DEPEND cycle error
f48d3bc CTest: Fix test DEPEND cycle detection
2010-12-21 13:58:21 -05:00
Bill Hoffman 16e7d4ba2c Add flags to resource builds on vs 2010 with a test. 2010-12-21 09:20:57 -05:00
Brad King ad25a968b9 Merge branch 'ImprovedDotSupport2' into dev/strict-mode
Conflicts:
	Source/cmake.cxx
2010-12-17 10:32:01 -05:00
Brad King 9bcaff02ff Merge branch 'cmake-guiRememberAdvancedCheckbox' into dev/strict-mode
Conflicts:
	Source/QtDialog/CMakeSetupDialog.cxx
2010-12-17 10:31:19 -05:00
Ben Boeckel 7679f9fab0 Rename WorkingDirectory test 2010-12-16 16:50:47 -05:00
Rolf Eike Beer d95f817f77 Add the WORKING_DIRECTORY property to tests 2010-12-16 16:23:18 -05:00
Brad King f48d3bc5ba CTest: Fix test DEPEND cycle detection
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>
2010-12-15 16:49:34 -05:00
Eric NOULARD dd2a5aa69f CPack Default component test for ZIP should be OK 2010-12-14 12:20:56 -05:00
Eric NOULARD 88b7f4252c CPack new tests for component install 2010-12-14 12:20:54 -05:00
Ben Boeckel 544d0c3774 Fix expected output for WarnUninitialized test 2010-12-07 17:00:41 -05:00
Ben Boeckel 4e3bea41ee Update expected messages to new format 2010-12-07 16:46:10 -05:00
Ben Boeckel 88cd4c1e92 Use 'CMake Warning' versus 'warning' for CDash 2010-12-07 14:40:21 -05:00
David Cole 385b681138 Merge topic 'add-cse-contract-test'
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.
2010-11-09 15:46:59 -05:00
David Cole c8f39193e0 Avoid problem reading jni.h on Macs.
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.
2010-10-25 15:03:36 -04:00
David Cole 1e4fd5fc9c Enable overriding contract test timeout values.
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.
2010-10-22 14:31:36 -04:00
David Cole c81ad34e85 Add a contract test for building the CSE.
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'.
2010-10-08 15:09:24 -04:00
Ben Boeckel 2507f937bd Change the failure case string to 'Unexpected'
VS6 detects the 'Error' string and fails itself even though we don't
actually care about it unless CMAKE_STRICT is on.
2010-10-08 09:46:38 -04:00
Ben Boeckel fe390a2607 Add 'ArgumentExpansion' test 2010-10-07 13:01:32 -04:00
Ben Boeckel d3a89432fd Fix which string is checked for in the test
GNU Makefiles have an extra line that Visual Studio doesn't output.
2010-09-30 11:39:26 -04:00
Ben Boeckel 220c5dc45a Add test that CMake errors with empty libs
When the library language cannot be determined, make sure CMake errors,
not segfaults (bug #11230)
2010-09-30 11:01:35 -04:00
Bill Hoffman 942ace8393 Fix contract test so it is not hard coded to the vtk542 test. 2010-09-21 15:08:13 -04:00
Bill Hoffman fd343a1a36 Add a "Contract" test for VTK. The test downloads and builds VTK.
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.
2010-09-21 10:23:09 -04:00
Ben Boeckel a117e02cc8 Revert "Add test for unused warnings at the end of scope"
This reverts commit 91c4c9921c.

The test doesn't work yet and should not have been put on this branch
yet.
2010-09-17 09:47:17 -04:00
Ben Boeckel 91c4c9921c Add test for unused warnings at the end of scope 2010-09-16 13:54:16 -04:00
Ben Boeckel f7438ca7ac Add test for unused detection via setting it 2010-09-16 13:52:54 -04:00
Ben Boeckel aefc91dd37 Add test for usage checks via unset 2010-09-16 13:51:51 -04:00
Brad King 6580f5de99 Merge topic 'improve-missing-source-file-error'
a6b5ead Report missing source files with context of target
2010-09-14 13:31:10 -04:00
Brad King a6b5ead62f Report missing source files with context of target
Previously we reported only the CMakeLists.txt file in the directory
that adds the target.
2010-09-13 16:17:20 -04:00
David Cole 20a6f6cf7a Use QUIET to avoid Java status messages.
CMake devs mostly do not care when Java is found successfully.
2010-09-09 15:41:53 -04:00
Ben Boeckel 439877f620 Be consistent with single and double quotes 2010-09-02 12:14:06 -04:00
Ben Boeckel f047a17c59 Add test for uninitialized variables 2010-09-02 11:34:13 -04:00
Ben Boeckel 75bda3864e Add tests for unused command line variables 2010-09-02 11:33:57 -04:00
Zach Mullen 32242affea Added CTest command --print-labels
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.
2010-08-31 10:41:23 -04:00
Bill Hoffman 929b1c6be3 Remove the ctest submit larget output test.
This test is better covered in CDash now.  It is always failing due
to changes in CDash.  So, it is better removed from CMake.
2010-08-09 13:21:19 -04:00
Brad King 46718ad10d Merge topic 'fix-CTestTestFailedSubmit-xmlrpc'
fbe67a9 CTestTestFailedSubmit-xmlrpc: Pass with "Submission problem"
2010-08-03 16:15:26 -04:00
Modestas Vainius fbe67a9fda CTestTestFailedSubmit-xmlrpc: Pass with "Submission problem"
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
------
2010-07-29 11:39:29 -04:00
Brad King df1e00ff82 Refer to self with CMake_(SOURCE|BINARY)_DIR (#10046)
This is good practice, and is necessary to support building CMake as a
subdirectory of another project.
2010-07-29 11:22:48 -04:00
Brad King f7a0386fc5 Merge topic 'resolve/ctest-file-checksum/remove-CTestTest3'
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.
2010-07-13 17:05:33 -04:00
Brad King 38c762c728 Merge 'remove-CTestTest3' into ctest-file-checksum
Conflicts:
	Tests/CMakeLists.txt
2010-07-13 17:01:39 -04:00
David Cole 391acdf199 Add another expected output for the failed submit tests.
The CTestTestFailedSubmit-http test was failing on the
hut11 Experimental dashboards with "Empty reply from
server" due to a localhost settings change.
2010-07-12 17:48:33 -04:00
Zach Mullen 3e52000a07 Fix cycle detection for test dependencies 2010-06-30 10:39:17 -04:00
Brad King 4f4cce5637 Merge branch 'remove-CTestTest3' 2010-06-15 14:10:50 -04:00
Brad King b6313565e1 Merge branch 'msys-bootstrap-test' 2010-06-15 14:06:28 -04:00
David Cole 199e7f2f33 Remove CTestTest3.
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.
2010-06-13 11:02:27 -04:00
Brad King 5e102d5e01 Enable BootstrapTest on MSYS
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.
2010-06-11 14:30:44 -04:00
Zach Mullen af5ef0c969 Testing for CTest checksum 2010-06-10 12:25:49 -04:00
Brad King 376fb31d1a Run CTest.NoNewline test using built CMake
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.
2010-06-10 08:24:27 -04:00
Brad King 6cf1ccd632 Merge branch 'per-config-link-flags' 2010-06-07 14:36:28 -04:00
Brad King 69292eacfa Merge branch 'fix-large-output-test' 2010-06-07 14:33:57 -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
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
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 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
David Cole 2938263636 Fix missing set of MSVC10 and add CheckCompilerRelatedVariables test. 2010-04-30 00:46:24 -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 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
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
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
Bill Hoffman bdcce34435 Fix BadExe test on cygwin. 2009-12-18 09:24:49 -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
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 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 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
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 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 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 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
Zach Mullen 1da9b54a59 BUG 9950: increase timeout for BootstrapTest to 1.5 hours 2009-11-23 10:22:09 -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
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
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
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 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
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
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
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
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
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
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 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 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 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 d03c6d970f Use LABELS in some ctest_coverage calls to increase coverage in cmCTestCoverageHandler.cxx. 2009-10-15 12:07:14 -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
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
David Cole a6facbcca3 Use the correct CMake (the freshly built one) to drive the CMakeWizardTest. 2009-10-07 06:33:09 -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 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 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
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
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
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
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 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 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 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
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 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
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 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
Bill Hoffman 0902d2918e ENH: set expected failure for tests 2009-07-20 10:58:50 -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
Alexander Neundorf 7048373296 STYLE: don't load CMakeDetermineSystem and CMakeSystemSpecific directly from
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
2009-07-12 04:51:51 -04:00
Brad King 22b96543e5 ENH: Test transitive link languages
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.
2009-07-10 13:53:38 -04:00
Brad King d4d467dbd5 ENH: Teach CTest to handle Mercurial repositories
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.
2009-07-10 11:08:05 -04:00
Brad King 4fc192c6cf BUG: Skip CTest.Update* for cygwin tools on Windows
These tests cannot run with cygwin tools unless testing cygwin CTest.
The version control tools do not understand all Windows paths.
2009-07-01 14:29:25 -04:00
Brad King c8a1621ebf BUG: Fix CTest.UpdateBZR tests to run in parallel
The UpdateBZR and UpdateBZR.CLocale tests should run in different
directories so that they can be executed in parallel.
2009-06-25 10:51:53 -04:00
Brad King 191573e8d7 BUG: Extend timeout of ExternalProject 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.
2009-06-24 14:48:27 -04:00
Brad King db024f444e ENH: Auto-enable CTest.UpdateCVS test on Windows
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.
2009-06-22 16:26:02 -04:00
Brad King 55c4cbbae9 BUG: Parse more bzr xml output encodings
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.
2009-05-18 10:34:35 -04:00
Brad King a524e07152 ENH: Teach CTest to handle Bazaar repositories
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.
2009-05-14 16:13:52 -04:00
Brad King 9c17cbeb44 ENH: Teach CTest to handle git repositories
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.
2009-04-22 09:19:06 -04:00
Bill Hoffman bac4f79764 ENH: change to use CMAKE_CREATE_VERSION from CMAKE_VERSION as CMAKE_VERSION is auto-defined now 2009-01-27 10:35:29 -05:00
Brad King 3028ca756c ENH: Better policies for functions and macros
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.
2009-01-22 13:16:47 -05:00
David Cole 3a4f76949a BUG: Fix issue #8402. Add a drag and drop bundle generator to the Mac build of CPack. Add a test of it in the CPackComponents test. Thanks to Clinton Stimpson for the patch. 2009-01-22 12:12:44 -05:00
David Cole e8a0e90133 BUG: Avoid trying to package the X11 test on Windows when there is no NSIS installer available. 2009-01-22 10:22:30 -05:00
David Cole c647ed54d9 BUG: Fix issue #7833: Add file extension handling to CPack generated installers for OSXX11 applications. Also modify the X11 test to build such an installer on Mac builds that test CPack and have X11 available. Thanks to Wes Turner for the patch. 2009-01-21 11:54:30 -05:00
Brad King b5f3d4be61 ENH: Re-enable new 'testing' test mode
This fixes selection of a configuration when none is specified to find
an available configuration of the ctest test-command.
2009-01-05 14:14:25 -05:00
Brad King fb4f016299 BUG: Disable new 'testing' test mode for now
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.
2008-12-18 17:15:58 -05:00
Brad King 64f419c0e8 BUG: Fix new 'testing' test for CMake releases
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.
2008-12-18 14:26:20 -05:00
Brad King adb6bf82b0 ENH: Improve 'testing' test to actually test
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.
2008-12-18 12:28:05 -05:00
Bill Hoffman a87bb1b2f9 ENH: remove some verbosity to reduce test time 2008-12-11 14:35:57 -05:00
David Cole 930827d48c ENH: First draft of add_external_project functionality. Tweaks, dashboard fixing, more tests and documentation certain to follow as it gets used by others... 2008-12-04 13:27:48 -05:00
David Cole ceaef94ccc ENH: Implement feature request from issue 7885. Allow setting environment variables on a per-test basis for ctest using set_test_properties ENVIRONMENT. 2008-11-26 14:38:43 -05:00
Bill Hoffman bdfc3fadd3 ENH: add more debug stuff to CTestCTest2 so I can figure out redwall 2008-11-23 10:49:46 -05:00
Bill Hoffman b8435f3d91 ENH: make ctest more verbose so that we can see failure on redwall 2008-11-21 16:37:49 -05:00
Bill Hoffman 1f9d9b2050 ENH: add gfortran-4 2008-11-18 09:37:06 -05:00
David Cole b0536e29ea ENH: Use settings for CPackComponents test to make it fail if the recent fix of cmCPackGenerator.cxx revision 1.16 ever encounters another regression. 2008-10-29 12:27:19 -04:00
Brad King e12f299f9d ENH: Enable cvs update test with CMake before 2.6
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.
2008-10-19 16:16:58 -04:00
Brad King 3584a4eceb ENH: Test CTest update logic with VCS tools
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.
2008-10-19 11:53:01 -04:00
Bill Hoffman 1777bb502a BUG: 4244, add a --build option to cmake that can build projects configured by CMake 2008-10-15 13:56:07 -04:00
Brad King 33e865c041 ENH: Add unset() command.
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.
2008-08-25 10:31:29 -04:00
Brad King 181c1eeede ENH: Add test_clean target to wipe out tests
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.
2008-08-19 11:43:57 -04:00
Alexander Neundorf e0f59d9af5 BUG: fix endif()
Alex
2008-08-06 17:43:34 -04:00
Alexander Neundorf e6290446d8 ENH: add simple tests to test that the extra generators don't crash
Alex
2008-08-06 16:16:53 -04:00
Bill Hoffman 26aa93d2cd ENH: fix build with Xcode project was missing 2008-07-31 10:54:55 -04:00
David Cole 6ec7ec2079 ENH: Add test for the new CPack BundleGenerator. Thanks to Tim Shead for the patch. See issue #7170 for more details. 2008-07-30 16:36:22 -04:00
Bill Hoffman 2081dcbfce ENH: add get_test_property to bootstrap so bootstrap builds test the same as non-bootstrap builds 2008-07-07 15:07:54 -04:00
Brad King e245d4ea11 BUG: Replace non-bootstrap command with macro
- The GET_TEST_PROPERTY command does not exist during bootstrap.
  - Instead of lots of conditionals, replace it with a macro.
2008-07-03 15:46:37 -04:00