From 5181f1f86a4d4c2ac09a540285c938fe2c2fa262 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Sun, 29 Jan 2017 11:52:55 +0100 Subject: [PATCH] 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. --- Tests/CMakeTests/File-TIMESTAMP-NotBogus.cmake | 1 + Tests/CTestTestStopTime/GetDate.cmake | 1 + 2 files changed, 2 insertions(+) diff --git a/Tests/CMakeTests/File-TIMESTAMP-NotBogus.cmake b/Tests/CMakeTests/File-TIMESTAMP-NotBogus.cmake index d0e5fe35f1..f1aa39062b 100644 --- a/Tests/CMakeTests/File-TIMESTAMP-NotBogus.cmake +++ b/Tests/CMakeTests/File-TIMESTAMP-NotBogus.cmake @@ -1,6 +1,7 @@ set(STAMP_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/FileTimestamp-Stamp") set(STAMP_FORMAT "%Y-%m-%d") +unset(ENV{SOURCE_DATE_EPOCH}) string(TIMESTAMP timestamp1 "${STAMP_FORMAT}") file(WRITE "${STAMP_FILENAME}" "foo") diff --git a/Tests/CTestTestStopTime/GetDate.cmake b/Tests/CTestTestStopTime/GetDate.cmake index 1f4cb24d94..46ab2fbacf 100644 --- a/Tests/CTestTestStopTime/GetDate.cmake +++ b/Tests/CTestTestStopTime/GetDate.cmake @@ -49,6 +49,7 @@ macro(GET_DATE) # 01/12/2006 08:55:12 # mm/dd/YYYY HH:MM:SS # + unset(ENV{SOURCE_DATE_EPOCH}) string(TIMESTAMP "${GD_PREFIX}OV" "%m/%d/%Y %H:%M:%S") if(${GD_PREFIX}VERBOSE)