Commit Graph

407 Commits

Author SHA1 Message Date
Stephen Kelly afae7a95a0 Start testing expected values for compiler flags.
Should help catch unhandled flag warnings so far not handled by
check_cxx_compiler_flag FAIL_REGEXen.
2011-08-17 02:36:22 +02:00
Alex Neundorf 2963d0b078 Fix logic which decides when to execute automoc test
Alex
2011-08-16 23:48:01 +02:00
David Cole a772f21a7d Merge topic 'intel_fortran_vs2010'
3c53fbb Fix custom commands in VS2010 Fortran projects using CFG_INTDIR and test.
2011-08-16 17:01:33 -04:00
Alex Neundorf bf8ef778a3 Add a test for automoc
The files are taken from the Qt examples. They are BSD licensed, so it
should be fine. I only edited main.cpp to use both widgets.

Alex
2011-08-16 02:13:26 +02:00
Alex Neundorf 9fc87c6343 Add a test for the new --find-package mode
Alex
2011-08-11 23:34:17 +02:00
Stephen Kelly 30880707c0 Add the GenerateExportMacro with unit tests.
Reviewed-by: Marcus D. Hanwell <marcus.hanwell@kitware.com>
2011-08-07 18:33:47 +02:00
David Cole 91704ef2de Tests: Add a KWStyle test, equivalent to the make StyleCheck target 2011-08-03 21:37:01 -04:00
Bill Hoffman 3c53fbb1f0 Fix custom commands in VS2010 Fortran projects using CFG_INTDIR and test.
For custom commands in VS2010 Fortran projects the INTDIR variable
is different than in the rest of the solution because Intel
fortran still uses the old VS project files even in VS2010. So,
we replace $(Configuration) directly in the project files. I have also
added a FortranOnly test that tests this feature and is run on any
generator that has Fortran abilities.
2011-08-03 17:24:43 -04:00
Brad King 2b16232d45 Merge topic 'asn_java_support'
1417a55 Java: Fix documentation format and indentation
0b7627d Java: Use set_property/get_property for target variables.
b01a505 Java: Create correct jar archive dependencies.
f99c312 Java: Added some dependency magic to avoid recompilations.
f3233ba Java: Create java_class_filelist only if it does't exist.
a22ed3d Tests: Check for the new Java exeutable variables.
c177c8e Tests: Java tests should test UseJava.cmake
5c2106c Modules: Added CMake Java support.
a4b6275 FindJava: Find missing java development executables.
2011-07-26 14:54:33 -04:00
Brad King a4ec24269b CTest: Report tests not run due to unknown configuration
When add_test(NAME) is called without the CONFIGURATIONS argument then
the test is intended to run in any configuration.  In multi-config
generators like the VS IDE and Xcode tests created by add_test(NAME) can
only be run when testing a known configuration (otherwise there is no
way to generate the test command line).  If no test command line is
known for a particular configuration, or if no configuration is given to
ctest, report the test as not run instead of silently skipping it.

Also fix CMake's own TestsWorkingDirectory test invocation to correct a
previously silent failure exposed by this change.
2011-06-10 09:52:18 -04:00
Brad King 40792a1a15 Merge topic 'fix-12034-fixup-bundle-with-non-dotapp-exe'
51e16c0 BundleUtilities: Avoid test on Watcom dashboards (#12034)
41f962a Revert "BundleUtilities: Run test on Windows if either MSVC or dumpbin was found."
e17135e BundleUtilities: Add rpath to loadable modules in test.
8064044 BundleUtilities: Print reason for not loading module.so
f3de459 BundleUtilities: Run test on Windows if either MSVC or dumpbin was found.
900bf98 BundleUtilities: Disable running test on Windows unless using MSVC.
fa4dc08 BundleUtilities: Fix issues with custom target DEPENDS in test (#12034)
e40b79e BundleUtilities: Fix test when using xcode (#12034)
b68d3dc BundleUtilities: Fix regex to extract dependents from ldd (#12034)
7ac7b43 BundleUtilities: Work w/ non .app exes on Mac (#12034)
2011-06-07 14:06:09 -04:00
David Cole 51e16c05f7 BundleUtilities: Avoid test on Watcom dashboards (#12034) 2011-06-04 19:54:49 -04:00
Clinton Stimpson 41f962a2cb Revert "BundleUtilities: Run test on Windows if either MSVC or dumpbin was found."
This reverts commit f3de459cec.
There are some platforms without MSVC where this test doesn't work well.  We can look
into these later.
2011-06-02 09:09:14 -06:00
Bill Hoffman 7815e90e21 Fix for bug#10798. VS10 did not append -I flags with COMPILE_FLAGS prop.
This fix adds a test for this case for all generators.
2011-06-02 10:28:10 -04:00
Clinton Stimpson f3de459cec BundleUtilities: Run test on Windows if either MSVC or dumpbin was found. 2011-06-01 10:53:06 -06:00
Clinton Stimpson 900bf98d01 BundleUtilities: Disable running test on Windows unless using MSVC. 2011-05-31 22:15:34 -06:00
Clinton Stimpson fa4dc08a1a BundleUtilities: Fix issues with custom target DEPENDS in test (#12034) 2011-05-31 15:33:39 -04:00
Clinton Stimpson 7ac7b437b8 BundleUtilities: Work w/ non .app exes on Mac (#12034)
Also add a test of BundleUtilities including an exe,
some shared libs, a plugin, and a framework-style lib.

This test presently runs (and this functionality works)
on Linux, Mac and Windows.

For now, the framework-style lib is built as a plain old
shared lib because there is another yet-unresolved issue
with local frameworks without rpaths on the Mac.
2011-05-27 16:11:43 -04:00
Brad King 7039d1fd9b Fix CompileCommandOutput test for Make tools not supporting spaces
Use underscores instead of spaces for such Make tools.
2011-05-19 07:38:06 -04:00
Manuel Klimek 8346a28a0a Only offer the compile command output feature on unix systems 2011-05-16 10:42:10 -04:00
Manuel Klimek 0e6b05fcba Adds a test for the compile command line output. 2011-04-25 13:27:59 -04:00
Brad King b7b9597b75 Merge topic 'drag-n-drop-components'
dd04608 Fix KWStyle warnings
2973c1f Add component support to DragNDrop generator.
2011-04-05 14:29:06 -04:00
Brad King fff3a742b2 Merge topic 'upload-built-files'
3e32db7 cmCTestUploadCommand::CheckArgumentKeyword should return false if not FILES
6b6f309 Add the FILES keyword to ctest_upload command
28cdd0a Don't tar/gz ctest_upload() files
fbe4356 Change 'Files' tag to 'Upload' in Upload.xml
350546d Implement ctest_upload command
2011-04-05 14:28:38 -04:00
Clinton Stimpson 2973c1fbeb Add component support to DragNDrop generator. 2011-03-31 13:33:10 -04:00
Brad King 0506e37499 Merge topic 'cleanup-unused-variable-check'
a4335a6 Fix unused cache warning after multiple configure iterations
a75ebe3 Refine unused cache variable warning
2011-03-31 13:22:54 -04:00
Andreas Schneider a22ed3d62d Tests: Check for the new Java exeutable variables. 2011-03-29 11:54:42 +02:00
Brad King a75ebe3ea4 Refine unused cache variable warning
List all unused variables in one warning.  Cleanup implementation to run
the check exactly once at the end of generation.
2011-03-24 09:45:33 -04:00
Eric NOULARD 6dfc818394 CPack fix #11930 and simplifies component packaging options 2011-03-23 18:28:05 +01:00
Brad King 80ccc9aafb Disable Java test with Xcode generator
The parent commit 46c0a583 (Enable Java test more carefully on Apple,
2011-03-18) failed to restore the exclusion of Xcode when enabling the
Java test that was originally removed by commit c8f39193 (Avoid problem
reading jni.h on Macs, 2010-10-25).  The Xcode generator does not work
with the current Java support at all.
2011-03-18 14:18:11 -04:00
Brad King 46c0a5832d Enable Java test more carefully on Apple
The CTEST_RUN_Java option added by commit c8f39193 (Avoid problem
reading jni.h on Macs, 2010-10-25) was a quick hack to disable the Java
test on Mac machines after an update from Apple created a broken jni.h
symlink.  Remove the option and instead test whether jni.h exists as a
readable file before reading it.  This restores the original Java test
enabling logic but makes it robust to the broken symlink.
2011-03-18 13:46:57 -04:00
Zach Mullen 350546db3a Implement ctest_upload command 2011-03-15 15:07:37 -04:00
M. Konrad bf7066c6ce CPackDeb add Component Support to DEB generator fix #0011655
Contribution by Martin Konrad
Signed-off-by: Eric NOULARD <eric.noulard@gmail.com>
2011-03-11 08:47:15 +01:00
Brad King 5148d0b92d Merge topic 'CPackRPM-enableCPackTests'
dc9965f CPackRPM  do not run test if build dir contains space
e4d4dfc CPackRPM  activate CPackRPM test on Linux systems where rpmbuild is found
2011-03-08 14:22:28 -05:00
Eric NOULARD dc9965f9a0 CPackRPM do not run test if build dir contains space 2011-03-04 22:17:10 +01:00
Brad King 077954d4cb Test static linking with LINK_SEARCH_START_STATIC
Add "LinkStatic" test that links a static executable against "libm.a".
Pass both "/usr/lib/libm.a" and "-lm" to target_link_libraries to
trigger the link type logic for both cases.  If CMake incorrectly
switches the link type to shared for "-lm" then the link will fail.
2011-03-04 08:37:57 -05:00
Eric NOULARD e4d4dfc6ef CPackRPM activate CPackRPM test on Linux systems where rpmbuild is found 2011-03-03 20:45:43 +01:00
Brad King 521d244531 Merge topic 'mingw-module-definition'
6a61a8a Honor module .def files with MinGW tools (#9997)
2011-02-22 14:33:04 -05:00
Brad King 64d997a78c Merge topic 'fix-11295-support-plugin-bundles-on-mac'
cabc407 CFBundle Test: Add PATHS for finding Rez (#11295)
5457b82 Add support for CFBundle targets on the Mac (#11295)
2011-02-22 14:30:58 -05:00
Brad King 70bd240e6c Merge topic 'increase-ep-test-timeout'
42b26ee ExternalProject Test: Increase test timeout value
2011-02-22 14:29:49 -05:00
Brad King 6a61a8a538 Honor module .def files with MinGW tools (#9997)
Since commit 024d05ad (Fix use of module .def files for MS tools,
2009-09-29) module .def files work for any platform that sets
CMAKE_LINK_DEF_FILE_FLAG correctly.  Set it in the Windows-GNU platform
information file to enable support with MinGW tools.  Also enable the
test added by commit 0db2c850 (Test use of module .def files for MS
tools, 2009-09-29) for MinGW and MSYS generators.
2011-02-21 14:34:54 -05:00
Eric NOULARD b8da1a1378 Avoid foreach IN LISTS syntax which is not supported by CMake 2.6 2011-01-31 17:25:29 +01:00
Eric NOULARD 92ced20fa1 CPack Tests the different ways of packaging components 2011-01-30 13:11:25 +01:00
Brad King 7457a0fd80 Merge topic 'MakeCMakeBuildWithCMakeLess263'
ccbdc24 Make cmake build again with cmake < 2.6.3
2011-01-28 14:17:12 -05:00
Brad King 182eb7c7ef Merge topic 'dev/strict-mode'
dd2f814 Merge branch 'dev/add_test-working-directory' into dev/strict-mode
949d32c Unwatch manual variables upon removal in cmake-gui
3939032 Unwatch manual variables upon removal in ccmake
8354413 Add method to unwatch a manual variable
8ed3c85 Give a better message for unused variables
729db48 Fix ArgumentExpansion test expected results
89c2544 Checking for a definition is a usage
5625dee Don't output to stderr in the GUI
ad25a96 Merge branch 'ImprovedDotSupport2' into dev/strict-mode
c128abe Merge branch 'AddCMAKE_CURRENT_LIST_DIR' into dev/strict-mode
9bcaff0 Merge branch 'cmake-guiRememberAdvancedCheckbox' into dev/strict-mode
544d0c3 Fix expected output for WarnUninitialized test
4e3bea4 Update expected messages to new format
8e8c9e4 Don't check at destruction for usage
668e005 Use cmake::IssueMessage for warnings
88cd4c1 Use 'CMake Warning' versus 'warning' for CDash
3c3b98d Initialize the class before setting warn flags
cf8b15a Ignore files under the CMakeFiles directory
fd50f06 Don't check for unused vars at configure time
447a04c Don't warn during configure when doing everything
b97ee21 Check for unused variables at the end of generate
c18c977 When checking for variables, specify a reason
3f1121f Use a long int since Line is a long as well
2507f93 Change the failure case string to 'Unexpected'
fe390a2 Add 'ArgumentExpansion' test
8dbb209 Wrong boolean value for CLI warnings
d4ee998 Hard-code the --no-warn-unused-cli flag
a267b99 Fix line lengths
82ed104 Flag that the directories have been set
5aa535b Add argument to arg parsing to not set directories
367e5c3 Revert "Revert "When calling CMake, set the args and the cache""
ab5d4e4 Revert "When calling CMake, set the args and the cache"
9b90040 When calling CMake, set the args and the cache
fe56002 Fix long lines for KWStyle
5d30cfc Set a watch on variables added through the gui
33c63b1 Add a method to put a watch for variables
535253f Initialize the warning variables earlier
cbb286c Fix the path detection to work for top-level
62be1f7 Initialize the usage stack earlier
c6e7fab Factor out the checks for unused variables
5e41ba8 When using the API, check for Add vs. Remove
dee1976 Fix typo in VariableUnusedViaUnset test
f231ce5 Remove old false positive avoidance code
a117e02 Revert "Add test for unused warnings at the end of scope"
2c82f2b Exempt CMAKE(CURRENT|PARENT)_LIST_FILE from usage
6d7d449 Ignore CLI warnings for ABI determination
7740a73 Only return local keys that are defined
bef3aee Use the API so that warnings can be tracked
05cb0f4 Check for unused variables in the dtor
91c4c99 Add test for unused warnings at the end of scope
ca90f67 Fix detection of unused variables when setting
f7438ca Add test for unused detection via setting it
995cfb0 Don't warn if the variable wasn't defined
aefc91d Add test for usage checks via unset
a8e97f8 Remove VarRemoved code since it's been superceded
59463ef Rework CheckVariableForUnused usage
f117423 Fix line lengths to be no more than 78
e49a935 Improve unused warning logic
e01e40c Mark ARGC, ARGV*, and ARGN as used
a17aff7 Ignore CMAKE_MATCH_* variables for usage
02a114d Add method to allow variables to be marked as used
a0b0d23 CMAKE_DO_TRY_COMPILE is no longer used
ae3eff3 Fix the path used for ignoring system warnings
056b441 Fix missing case for usage of a variable
980e048 Factor out checks for unused variables
83acb0a Remove now unused variables
3801463 Use built-ins for readability and maintainability
8b52015 Push the initialize and unused states when copying
439877f Be consistent with single and double quotes
4cf1706 Add documentation for check-system-vars
b74777f Fix the spelling of the flag for warn-unused-vars
b948120 Change logic of flag to turn off cli unused checks
f047a17 Add test for uninitialized variables
75bda38 Add tests for unused command line variables
300fc15 Fix detection of system files
d784e6a Run the unused variables check on the final pass
9efc057 VariableWatch is not available when bootstrapping
2e78224 Add a missing comma to the warning message
7499700 Add a flag to warn about system files
fff9f6d Rename flags again and use variablewatch for cli
786e269 Add warn-unused to the Qt interface
636e6c4 Default to marking things as used
4ff0340 Rename find-unused to warn-unused
d7999e9 Rename strict-mode to warn-uninitialized
e141bc9 Detect unused variables
d3e8eb5 Add flags to detect unused variables
f332e14 Complete strict-mode checks for uninitialized vars
52f9637 Add method to get the local scope variables
f794d58 Make --strict-mode option, and integrate with cmake-gui
48b5b85 Add a warning when variables are used uninitialized.
cd626ea For macros make sure the FilePath points to a valid pointer in the args.
2011-01-27 15:34:07 -05:00
Brad King dd2f81491e Merge branch 'dev/add_test-working-directory' into dev/strict-mode
Conflicts:
	Tests/CMakeLists.txt
2011-01-27 14:39:55 -05:00
Alex Neundorf ccbdc24ae1 Make cmake build again with cmake < 2.6.3
cmake_minimum_required() still says 2.4.5, but in Tests/CMakeLists.txt
there was a parenthesis expression, which is new since 2.6.3.

Alex
2011-01-26 21:52:22 +01:00
Brad King ab8ea7c413 Merge topic 'resolve/mingw-cross-compile-resources/honor-explicit-zero-timeout'
aeb6cd8 Merge branch 'honor-explicit-zero-timeout' into resolve/mingw-cross-compile-resources/honor-explicit-zero-timeout
20d87c8 Teach Simple_Mingw_Linux2Win test to use windres
2011-01-19 14:03:41 -05:00
Brad King 7af41c3492 Test that missing source mentions directory (#11677)
Teach the MissingSourceFile test to verify that the directory portion of
a missing source file is mentioned in the error message.
2011-01-15 08:16:50 -05:00
Brad King aeb6cd8a89 Merge branch 'honor-explicit-zero-timeout' into resolve/mingw-cross-compile-resources/honor-explicit-zero-timeout
Conflicts:
	Tests/CMakeLists.txt
2011-01-14 10:44:41 -05:00
Brad King 20d87c8026 Teach Simple_Mingw_Linux2Win test to use windres
This test was broken by commit b2f308c8 (Add support for windows
resources with mingw/msys, 2010-12-22) because the test does not set a
resource compiler which is now required on MinGW for the 'RC' language.
Use windres as the resource compiler for the test.
2011-01-14 10:22:15 -05:00
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