[cmake-developers] [CMake 0015610]: ctest_update can fail without returning -1 as RETURN_VALUE
Mantis Bug Tracker
mantis at public.kitware.com
Thu Jun 11 06:10:36 EDT 2015
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=15610
======================================================================
Reported By: trsystran
Assigned To:
======================================================================
Project: CMake
Issue ID: 15610
Category: CTest
Reproducibility: have not tried
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2015-06-11 06:10 EDT
Last Modified: 2015-06-11 06:10 EDT
======================================================================
Summary: ctest_update can fail without returning -1 as
RETURN_VALUE
Description:
A ctest_update running git fetch failed:
Update command failed: "git" "fetch"
>From the LastUpdate*.log:
fetch-err> fatal: Unable to create
'E:/repo/.git/refs/remotes/origin/master.lock': File exists.
But in the CTest script we check for error:
ctest_update(RETURN_VALUE res)
if(res LESS 0) # stop if update error
ctest_submit(PARTS Notes Update)
return()
endif()
According to the documentation
(http://www.cmake.org/cmake/help/v3.2/command/ctest_update.html) ctest_update
must return -1 in such case. It didn't.
The issue is in Sources/CTest/cmCTestUpdateHandler.cxx:292: "return numUpdated;"
numUpdated is always returned, even in case of update error: the bool "update"
should be used to return -1
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2015-06-11 06:10 trsystran New Issue
======================================================================
More information about the cmake-developers
mailing list