[Cmake-commits] CMake branch, next, updated. v3.0.1-4902-g427f096
Bill Hoffman
bill.hoffman at kitware.com
Wed Aug 13 13:54:15 EDT 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 427f096751763b1b94e4303d27713e8ce3ca06ec (commit)
via e18ed0310aad64708dc01ce7d66f262aa1bf4683 (commit)
from 5c047211a5e933fd4d30a2956800742686464c97 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=427f096751763b1b94e4303d27713e8ce3ca06ec
commit 427f096751763b1b94e4303d27713e8ce3ca06ec
Merge: 5c04721 e18ed03
Author: Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Wed Aug 13 13:54:14 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Aug 13 13:54:14 2014 -0400
Merge topic 'ctest_update_status_only' into next
e18ed031 Teach ctest_update to only note the version via CTEST_UPDATE_VERSION_ONLY var.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e18ed0310aad64708dc01ce7d66f262aa1bf4683
commit e18ed0310aad64708dc01ce7d66f262aa1bf4683
Author: Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Wed Aug 13 13:45:08 2014 -0400
Commit: Bill Hoffman <bill.hoffman at kitware.com>
CommitDate: Wed Aug 13 13:45:08 2014 -0400
Teach ctest_update to only note the version via CTEST_UPDATE_VERSION_ONLY var.
This allows ctest_update to get the current version without actually changing
the repository. This is useful when using jenkins or an external
project to update the source to a specific version, but you still want
the current version to show up in CDash.
diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst
index a57a8f0..52e4beb 100644
--- a/Help/manual/ctest.1.rst
+++ b/Help/manual/ctest.1.rst
@@ -668,6 +668,15 @@ Configuration settings to specify the version control tool include:
* :module:`CTest` module variable: ``UPDATE_TYPE`` if set,
else ``CTEST_UPDATE_TYPE``
+``UpdateVersionOnly``
+ Specify that you want the version control update command to only
+ discover the current version that is checked out, and not to update
+ to a different version.
+
+ * `CTest Script`_ variable: :variable:`CTEST_UPDATE_VERSION_ONLY`
+
+
+
Additional configuration settings include:
``NightlyStartTime``
diff --git a/Help/variable/CTEST_UPDATE_VERSION_ONLY.rst b/Help/variable/CTEST_UPDATE_VERSION_ONLY.rst
new file mode 100644
index 0000000..3665147
--- /dev/null
+++ b/Help/variable/CTEST_UPDATE_VERSION_ONLY.rst
@@ -0,0 +1,5 @@
+CTEST_UPDATE_VERSION_ONLY
+------------------------
+
+Specify the CTest ``UpdateVersionOnly`` setting
+in a :manual:`ctest(1)` dashboard client script.
diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in
index 0420882..86049d0 100644
--- a/Modules/DartConfiguration.tcl.in
+++ b/Modules/DartConfiguration.tcl.in
@@ -37,6 +37,9 @@ ConfigureCommand: "@CMAKE_COMMAND@" "@PROJECT_SOURCE_DIR@"
MakeCommand: @MAKECOMMAND@
DefaultCTestConfigurationType: @DEFAULT_CTEST_CONFIGURATION_TYPE@
+# version control
+UpdateVersionOnly: @CTEST_UPDATE_VERSION_ONLY@
+
# CVS options
# Default is "-d -P -A"
CVSCommand: @CVSCOMMAND@
diff --git a/Source/CTest/cmCTestUpdateCommand.cxx b/Source/CTest/cmCTestUpdateCommand.cxx
index 5408a8a..f87466d 100644
--- a/Source/CTest/cmCTestUpdateCommand.cxx
+++ b/Source/CTest/cmCTestUpdateCommand.cxx
@@ -56,6 +56,8 @@ cmCTestGenericHandler* cmCTestUpdateCommand::InitializeHandler()
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"GITUpdateCustom", "CTEST_GIT_UPDATE_CUSTOM");
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
+ "UpdateVersionOnly", "CTEST_UPDATE_VERSION_ONLY");
+ this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"HGCommand", "CTEST_HG_COMMAND");
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"HGUpdateOptions", "CTEST_HG_UPDATE_OPTIONS");
diff --git a/Source/CTest/cmCTestVC.cxx b/Source/CTest/cmCTestVC.cxx
index f89fa2b..15f796f 100644
--- a/Source/CTest/cmCTestVC.cxx
+++ b/Source/CTest/cmCTestVC.cxx
@@ -166,10 +166,17 @@ void cmCTestVC::CleanupImpl()
//----------------------------------------------------------------------------
bool cmCTestVC::Update()
{
- this->NoteOldRevision();
- this->Log << "--- Begin Update ---\n";
- bool result = this->UpdateImpl();
- this->Log << "--- End Update ---\n";
+ bool result = true;
+ // if update version only is on then do not actually update,
+ // just note the current version and finish
+ if(!cmSystemTools::IsOn(
+ this->CTest->GetCTestConfiguration("UpdateVersionOnly").c_str()))
+ {
+ this->NoteOldRevision();
+ this->Log << "--- Begin Update ---\n";
+ result = this->UpdateImpl();
+ this->Log << "--- End Update ---\n";
+ }
this->NoteNewRevision();
return result;
}
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index ca7fcdc..d36f3ac 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2012,9 +2012,9 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
mark_as_advanced(GIT_EXECUTABLE)
set(CTEST_TEST_UPDATE_GIT 0)
if(GIT_EXECUTABLE)
- if(NOT "${GIT_EXECUTABLE}" MATCHES "cygwin" OR UNIX)
+# if(NOT "${GIT_EXECUTABLE}" MATCHES "cygwin" OR UNIX)
set(CTEST_TEST_UPDATE_GIT 1)
- endif()
+# endif()
endif()
if(CTEST_TEST_UPDATE_GIT)
set(CTestUpdateGIT_DIR "CTest UpdateGIT")
diff --git a/Tests/CTestUpdateCommon.cmake b/Tests/CTestUpdateCommon.cmake
index 857c6f5..97153f0 100644
--- a/Tests/CTestUpdateCommon.cmake
+++ b/Tests/CTestUpdateCommon.cmake
@@ -219,6 +219,36 @@ function(run_dashboard_command_line bin_dir)
endfunction()
#-----------------------------------------------------------------------------
+# Function to find the Update.xml file and make sure
+# it only has the Revision in it and no updates
+function(check_no_update bin_dir)
+ set(PATTERN ${TOP}/${bin_dir}/Testing/*/Update.xml)
+ file(GLOB UPDATE_XML_FILE RELATIVE ${TOP} ${PATTERN})
+ string(REGEX REPLACE "//Update.xml$" "/Update.xml"
+ UPDATE_XML_FILE "${UPDATE_XML_FILE}")
+ message(" found ${UPDATE_XML_FILE}")
+ set(rev_regex "Revision|PriorRevision")
+ file(STRINGS ${TOP}/${UPDATE_XML_FILE} UPDATE_XML_REVISIONS
+ REGEX "^\t<(${rev_regex})>[^<\n]+</(${rev_regex})>$"
+ )
+ set(found_revisons FALSE)
+ foreach(r IN LISTS UPDATE_XML_REVISIONS)
+ if("${r}" MATCHES "PriorRevision")
+ message(FATAL_ERROR "Found PriorRevision in no update test")
+ endif()
+ if("${r}" MATCHES "<Revision>")
+ set(found_revisons TRUE)
+ endif()
+ endforeach()
+ if(found_revisons)
+ message(" found <Revision> in no update test")
+ else()
+ message(FATAL_ERROR " missing <Revision> in no update test")
+ endif()
+endfunction()
+
+
+#-----------------------------------------------------------------------------
# Function to run the dashboard through a script
function(run_dashboard_script bin_dir)
run_child(
@@ -228,13 +258,17 @@ function(run_dashboard_script bin_dir)
# Verify the updates reported by CTest.
list(APPEND UPDATE_MAYBE Updated{subdir} Updated{CTestConfig.cmake})
- check_updates(${bin_dir}
- Updated{foo.txt}
- Updated{bar.txt}
- Updated{zot.txt}
- Updated{subdir/foo.txt}
- Updated{subdir/bar.txt}
- )
+ if(NO_UPDATE)
+ check_no_update(${bin_dir})
+ else()
+ check_updates(${bin_dir}
+ Updated{foo.txt}
+ Updated{bar.txt}
+ Updated{zot.txt}
+ Updated{subdir/foo.txt}
+ Updated{subdir/bar.txt}
+ )
+ endif()
endfunction()
#-----------------------------------------------------------------------------
diff --git a/Tests/CTestUpdateGIT.cmake.in b/Tests/CTestUpdateGIT.cmake.in
index f6939de..41b732b 100644
--- a/Tests/CTestUpdateGIT.cmake.in
+++ b/Tests/CTestUpdateGIT.cmake.in
@@ -317,3 +317,20 @@ set(CTEST_GIT_UPDATE_CUSTOM \${CTEST_GIT_COMMAND} pull origin master)
# Run the dashboard script with CTest.
run_dashboard_script(dash-binary-custom)
+
+
+rewind_source(dash-source)
+
+#-----------------------------------------------------------------------------
+# Test no update with a dashboard script.
+message("Running CTest Dashboard Script (No update)...")
+
+create_dashboard_script(dash-binary-no-update
+ "# git command configuration
+set(CTEST_GIT_COMMAND \"${GIT}\")
+set(CTEST_UPDATE_VERSION_ONLY TRUE)
+")
+
+# Run the dashboard script with CTest.
+set(NO_UPDATE 1)
+run_dashboard_script(dash-binary-no-update)
-----------------------------------------------------------------------
Summary of changes:
Help/manual/ctest.1.rst | 9 ++++
...E_OPTIONS.rst => CTEST_UPDATE_VERSION_ONLY.rst} | 4 +-
Modules/DartConfiguration.tcl.in | 3 ++
Source/CTest/cmCTestUpdateCommand.cxx | 2 +
Source/CTest/cmCTestVC.cxx | 15 ++++--
Tests/CMakeLists.txt | 4 +-
Tests/CTestUpdateCommon.cmake | 48 +++++++++++++++++---
Tests/CTestUpdateGIT.cmake.in | 17 +++++++
8 files changed, 87 insertions(+), 15 deletions(-)
copy Help/variable/{CTEST_BZR_UPDATE_OPTIONS.rst => CTEST_UPDATE_VERSION_ONLY.rst} (50%)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list