diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2010-03-18 14:28:10 (GMT) |
---|---|---|
committer | Zach Mullen <zach.mullen@kitware.com> | 2010-03-18 14:29:02 (GMT) |
commit | a2fe175647718a562e41c84717b67917adbe584d (patch) | |
tree | d8b3110d644b1bf52b999fdb3bc559cf7e4afcf2 /Tests/CTestTestStopTime | |
parent | 1560d9dcca7312def996022b4702dc739ba2badb (diff) | |
download | CMake-a2fe175647718a562e41c84717b67917adbe584d.zip CMake-a2fe175647718a562e41c84717b67917adbe584d.tar.gz CMake-a2fe175647718a562e41c84717b67917adbe584d.tar.bz2 |
More debugging of StopTime test
Diffstat (limited to 'Tests/CTestTestStopTime')
-rw-r--r-- | Tests/CTestTestStopTime/GetDate.cmake | 14 | ||||
-rw-r--r-- | Tests/CTestTestStopTime/test.cmake.in | 5 |
2 files changed, 16 insertions, 3 deletions
diff --git a/Tests/CTestTestStopTime/GetDate.cmake b/Tests/CTestTestStopTime/GetDate.cmake index 71d1213..b793306 100644 --- a/Tests/CTestTestStopTime/GetDate.cmake +++ b/Tests/CTestTestStopTime/GetDate.cmake @@ -216,4 +216,18 @@ MACRO(ADD_SECONDS sec) math(EXPR new_hr "${${GD_PREFIX}HOUR} + 1") endwhile() math(EXPR new_hr "${new_hr} % 24") + + # Pad the H, M, S if needed + string(LENGTH ${new_sec} sec_len) + string(LENGTH ${new_min} min_len) + string(LENGTH ${new_hr} hr_len) + if(${sec_len} EQUAL 1) + set(new_sec "0${new_sec}") + endif() + if(${min_len} EQUAL 1) + set(new_min "0${new_min}") + endif() + if(${hr_len} EQUAL 1) + set(new_hr "0${new_hr}") + endif() ENDMACRO(ADD_SECONDS) diff --git a/Tests/CTestTestStopTime/test.cmake.in b/Tests/CTestTestStopTime/test.cmake.in index cf212cc..0d664ad 100644 --- a/Tests/CTestTestStopTime/test.cmake.in +++ b/Tests/CTestTestStopTime/test.cmake.in @@ -26,10 +26,9 @@ CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) GET_DATE() message("original time: ${${GD_PREFIX}HOUR}:${${GD_PREFIX}MINUTE}:${${GD_PREFIX}SECOND}") -ADD_SECONDS(15) +ADD_SECONDS(25) message("stop time: ${new_hr}:${new_min}:${new_sec}") CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res STOP_TIME "${new_hr}:${new_min}:${new_sec}") -GET_DATE() -message("finish time: ${${GD_PREFIX}HOUR}:${${GD_PREFIX}MINUTE}:${${GD_PREFIX}SECOND}") + #CTEST_SUBMIT() |