Files
CMake/Tests/RunCMake/CommandLineTar/set-mtime.cmake
Kasper Laudrup f692cba34b Tests: Add test for 'cmake -E tar --mtime' option
Add a test for ensuring the `--mtime` option works as expected.
2022-03-23 14:41:34 +01:00

12 lines
391 B
CMake

include(${CMAKE_CURRENT_LIST_DIR}/mtime-tests.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake)
foreach(file ${CHECK_FILES})
file(TIMESTAMP ${FULL_DECOMPRESS_DIR}/${COMPRESS_DIR}/${file} MTIME UTC)
if(NOT MTIME STREQUAL ARCHIVE_MTIME_RFC3339)
message(FATAL_ERROR
"Extracted timestamp ${MTIME} does not match expected ${ARCHIVE_MTIME_RFC3339}")
endif()
endforeach()