Commit 5181f1f8 authored by Bernhard M. Wiedemann's avatar Bernhard M. Wiedemann Committed by Brad King
Browse files

Tests: make tests pass with SOURCE_DATE_EPOCH set

Fix tests to account for commit 243aed52 (cmTimestamp: Support
SOURCE_DATE_EPOCH to override current time, 2017-01-25).

In openSUSE we are running the test-suite as part of the build and that
failed in these two places when building everything with
`SOURCE_DATE_EPOCH` set.
parent 84963f42
Pipeline #44719 passed with stage
set(STAMP_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/FileTimestamp-Stamp") set(STAMP_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/FileTimestamp-Stamp")
set(STAMP_FORMAT "%Y-%m-%d") set(STAMP_FORMAT "%Y-%m-%d")
unset(ENV{SOURCE_DATE_EPOCH})
string(TIMESTAMP timestamp1 "${STAMP_FORMAT}") string(TIMESTAMP timestamp1 "${STAMP_FORMAT}")
file(WRITE "${STAMP_FILENAME}" "foo") file(WRITE "${STAMP_FILENAME}" "foo")
......
...@@ -49,6 +49,7 @@ macro(GET_DATE) ...@@ -49,6 +49,7 @@ macro(GET_DATE)
# 01/12/2006 08:55:12 # 01/12/2006 08:55:12
# mm/dd/YYYY HH:MM:SS # mm/dd/YYYY HH:MM:SS
# #
unset(ENV{SOURCE_DATE_EPOCH})
string(TIMESTAMP "${GD_PREFIX}OV" "%m/%d/%Y %H:%M:%S") string(TIMESTAMP "${GD_PREFIX}OV" "%m/%d/%Y %H:%M:%S")
if(${GD_PREFIX}VERBOSE) if(${GD_PREFIX}VERBOSE)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment