Commit Graph

1322 Commits

Author SHA1 Message Date
Brad King 566bb2d078 Merge branch 'ctest-git-empty-commits' 2010-06-24 10:41:20 -04:00
Zach Mullen 1a4c0c55c7 Parallel CTest hangs if serial test has depends 2010-06-23 17:18:59 -04:00
Brad King bbfe241c6a CTest: Parse empty Git commits correctly
Git's diff-tree format has no '\n'-terminated blank line at the end of
its commit message body block if there are no diff lines.  Instead the
message body is terminated by '\0' and there is no diff section.  Teach
CTest to parse the format in this case.
2010-06-23 09:14:43 -04:00
David Cole 4ee426b057 Look in the ctest ini file for GitCommand.
If GIT_EXECUTABLE is not passed into the test, but the source
tree is a git checkout, then use GitCommand or UpdateCommand
from the ctest ini file to set its value. Presumably, a dashboard
running the test suite had to have set this properly in order
to do the ctest_update step.
2010-06-21 14:46:30 -04:00
Brad King 4f4cce5637 Merge branch 'remove-CTestTest3' 2010-06-15 14:10:50 -04:00
Brad King b4aa834900 Merge branch 'ctest-git-flexibility' 2010-06-15 14:10:41 -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
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 c3781efb28 ctest_update: Support Git upstream branch rewrites
Use 'git fetch' followed by 'git reset' to update the source tree.  This
is better than 'git pull' because it can handle a rewritten upstream
branch and does not leave local modifications.  After fetch, parse
FETCH_HEAD to find the merge head that 'git pull' would choose to track
the upstream branch.  Then reset to the selected head.

In the normal fast-forward case the behavior remains unchanged.
However, now local modifications and commits will be erased, and
upstream rewrites are handled smoothly.  This ensures that the upstream
branch is tested as expected.
2010-06-08 16:50:17 -04:00
Brad King 2eae651acc ctest_update: Support custom Git update command
Define CTest configuration variable CTEST_GIT_UPDATE_CUSTOM to set a
custom command line for updating Git-managed source trees.
2010-06-08 16:12:28 -04:00
Brad King 11bdc2b1a1 Generalize CTest.Update* test dashboard script helpers
Teach (create|run)_dashboard_script macros to treat the argument as the
name of a build tree.  Append '.cmake' to generate the dashboard script
name.  This allows future re-use of the macros for multiple test
scripts.
2010-06-08 15:58:39 -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
Brad King 9ed98d8802 Merge branch 'update_release_scripts' 2010-06-07 14:29:37 -04:00
Brad King d868ec9406 Merge branch 'add-git-to-CheckSourceTreeTest' 2010-06-07 14:28:45 -04:00
Brad King 0d07e4379e Merge branch 'improve-file-download'
Conflicts:
	Modules/ExternalProject.cmake
2010-06-07 14:26:24 -04:00
Brad King a03e85f13c Merge branch 'add-git-to-ExternalProject'
Conflicts:
	Modules/ExternalProject.cmake
2010-06-07 14:23:45 -04:00
David Cole f6909a69ec Use the long test timeout value for SubmitLargeOutput.
Hopefully this will be a large enough value to get the
large output test to pass on the still exceedingly slow
dash19.
2010-06-03 17:47:48 -04:00
David Cole 29383b4b85 Add FindGit module.
Use it from ExternalProject and the ExternalProject test's
CMakeLists file rather than having duplicate find_program calls.
Add logic so that we do not try to use *.cmd variants of git
programs when using the MSYS Makefiles generator. Should fix
the last remaining dashboard issue with the new ExternalProject
git support additions.

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

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

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

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

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

- Add documentation for SHOW_PROGRESS and EXPECTED_MD5.

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

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

Improve ExternalProject:

- Add argument URL_MD5.

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

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

- Emit a warning message when a file is not verified.
  Indicate that the file may be corrupt or that no
  checksum was specified.
2010-05-27 12:21:56 -04:00
Brad King 3ebb41d58a Merge branch 'version' 2010-05-17 13:34:29 -04:00
Bill Hoffman aa30bd3f2a Disable purify on unix, as it works differently and ctest can't use it. 2010-05-11 09:30:41 -04:00
Zach Mullen d80323bccd Fix CTestTestScheduler sporadic failure.
Increased the time difference between each test so that overburdened systems won't fail this test sometimes.
2010-05-07 11:16:44 -04:00
Brad King 678073bec2 CTest: Submit author email in Update.xml
Add the <Email>...</Email> element in Update.xml for each commit
reported.  This field was defined by Dart but never really used.
Distributed version control systems use author name and email
instead of a user id, so now it makes sense to use this field.
2010-05-07 09:17:26 -04:00
Brad King 4d653fb4ee Fix 'Architecture' test for more Mac linkers
Some Mac linkers produce the message

  "file was built for unsupported file format which is not the
   architecture being linked"

for this test.  Update the test output regex to match it.
2010-05-06 14:37:55 -04:00
Brad King 67277bacca Teach ctest_update about Git submodules
Git does not automatically checkout the matching version of a submodule
when it checks out a new version of the parent project in the work tree.
If the submodule reference changed in the parent project then we were
reporting the submodule path as a local modification.  Work around the
problem in ctest_update using "git submodule update" after "git pull".
For projects with no submodules this is a no-op.  See issue #10662.
Also add a submodule to the test project for CTest.UpdateGIT to test the
work-around.
2010-05-04 09:40:04 -04:00
David Cole 2938263636 Fix missing set of MSVC10 and add CheckCompilerRelatedVariables test. 2010-04-30 00:46:24 -04:00
Brad King 0328379411 Report commit hash in CMake development versions
For builds from Git repositories, add "-g<commit>" to the end of the
version number.  If the source tree is modified, append "-dirty".
For builds from CVS checkouts, add "-cvs-<branch>".
2010-04-23 10:01:49 -04:00
Zach Mullen 9676c52c3e Fix for StopTime for cases when gmtime is a day ahead of localtime 2010-03-18 13:53:40 -04:00
Zach Mullen a2fe175647 More debugging of StopTime test 2010-03-18 10:29:02 -04:00
Zach Mullen 91c1a70193 Output times during StopTime test for debugging 2010-03-17 12:32:44 -04:00
Zach Mullen b41647ca8f Move get_date call closer to ctest_test for more predictable results. 2010-03-17 11:10:39 -04:00
Zach Mullen 0ba9d04117 Add the --stop-time argument
Unit test and script hook for STOP_TIME
2010-03-17 11:04:13 -04:00
David Cole a61c5ab6e5 Add CMAKE_TESTS_CDASH_SERVER variable and CTestSubmitLargeOutput test.
If defined and non-empty, the value of CMAKE_TESTS_CDASH_SERVER should point
to a CDash server willing to accept submissions for a project named
PublicDashboard. On machines that also run a CDash dashboard, set this
variable to "http://localhost/CDash-trunk-Testing" so that the CMake tests
that submit dashboards do not have to send those submissions over the wire.

The CTestSubmitLargeOutput test runs a dashboard that has a test that produces
very large amount of output on stdout/stderr. Since we do not even want	 to
attempt to send such large output over the wire, this test is off by default
unless the CMAKE_TESTS_CDASH_SERVER server is localhost. This test is expected
to cause a submission failure when sent to CDash. It passes if the submit
results contain error output. It fails if the submit succeeds.

CMAKE_TESTS_CDASH_SERVER: CDash server used by CMake/Tests.

If not defined or "", this variable defaults to the server at
http://www.cdash.org/CDash.

If set explicitly to "NOTFOUND", curl tests and ctest tests that use the
network are skipped.

If set to something starting with "http://localhost/", the CDash is expected
to be an instance of CDash used for CDash testing, pointing to a
cdash4simpletest database. In these cases, the CDash dashboards should be
run first.
2010-03-08 13:25:58 -05:00
Zach Mullen 9d7e08de48 Remove empty_binary_dir command in new unit test 2010-03-03 10:49:21 -05:00