Commit Graph

1322 Commits

Author SHA1 Message Date
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