View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015610CMakeCTestpublic2015-06-11 06:102016-01-04 11:51
Reportertrsystran 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake 3.2.3 
Target VersionCMake 3.4Fixed in VersionCMake 3.4 
Summary0015610: ctest_update can fail without returning -1 as RETURN_VALUE
DescriptionA 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
TagsNo tags attached.
Attached Files

 Relationships
related to 0013583closedKitware Robot would like more info in cdash if the svn update command failed 
related to 0008262closedBill Hoffman ctest_update() not catching all errors 

  Notes
(0038908)
Clinton Stimpson (developer)
2015-06-11 09:11

Personally, I'd like to see these kinds of errors show up on cdash if doing this:

ctest_update(RETURN_VALUE res)
ctest_submit(PARTS Notes Update)
if(res LESS 0) # stop if update error
  return()
endif()
(0038909)
trsystran (reporter)
2015-06-11 10:21

The error is stored in the Update.xml, it's just not returned from the c++ method, and thus not returned as RETURN_VALUE in the CTest script.

I'm not sure if it shows up as an error in cdash though.
(0038910)
Brad King (manager)
2015-06-11 11:17

Here is a fix and a test case for the issue reported here:

 ctest_update: Fix RETURN_VALUE on VCS tool failure
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=493388ce [^]
(0038911)
trsystran (reporter)
2015-06-11 11:23

Thanks!

Does it also cover the error cases where there are locally modified files?

Maybe it's not an error, I don't know the ctest_update choice for locally modified, and locally modified conflicts.

Could it be also added to 3.3? It's a useful and trivial bug fix.
(0038912)
Brad King (manager)
2015-06-11 11:39

Re 0015610:0038911: Sorry, we do not typically make non-regression fixes in a released version after rc1 has been announced. One never knows when a change, no matter how trivial, may break someone's workflow in an unexpected way.

The change makes no difference with respect to locally modified files. That is not a failure to update.
(0040065)
Robert Maynard (manager)
2016-01-04 11:51

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2015-06-11 06:10 trsystran New Issue
2015-06-11 09:11 Clinton Stimpson Note Added: 0038908
2015-06-11 09:12 Clinton Stimpson Relationship added related to 0013583
2015-06-11 09:12 Clinton Stimpson Relationship added related to 0008262
2015-06-11 10:21 trsystran Note Added: 0038909
2015-06-11 11:17 Brad King Note Added: 0038910
2015-06-11 11:17 Brad King Assigned To => Brad King
2015-06-11 11:17 Brad King Status new => resolved
2015-06-11 11:17 Brad King Resolution open => fixed
2015-06-11 11:17 Brad King Fixed in Version => CMake 3.4
2015-06-11 11:17 Brad King Target Version => CMake 3.4
2015-06-11 11:23 trsystran Note Added: 0038911
2015-06-11 11:39 Brad King Note Added: 0038912
2016-01-04 11:51 Robert Maynard Note Added: 0040065
2016-01-04 11:51 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team