Check MD5sum for regressiontest
authorRoland Schulz <roland@utk.edu>
Tue, 5 Aug 2014 02:05:04 +0000 (22:05 -0400)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sun, 10 Aug 2014 12:56:02 +0000 (14:56 +0200)
Because we decided it is important for FFTW we should do it for
the tests too. Is only done for non -dev versions.

Change-Id: Id7d1ee027bd302ad7cb10f46d93b0f435872c67e

CMakeLists.txt
tests/CMakeLists.txt

index 98d0ab7bd841d54bcb7344f4fce065eb6658d10a..2abc0d729ae97f98181502c46ecb39dbfe5ac876 100644 (file)
@@ -64,6 +64,9 @@ set(PROJECT_VERSION "5.0.1-dev")
 # number of the regressiontest tarball against which the code tarball
 # can be tested. This will be the version of the last patch release.
 set(REGRESSIONTEST_VERSION "5.0.1-dev")
+# The MD5 checksum of the regressiontest tarball. Only used if "-dev"
+# is not present in the PROJECT_VERSION
+set(REGRESSIONTEST_MD5SUM "a07524afebca5013540d4f2f72df2dce")
 # If this is not a released tarball, "-dev" will be present in
 # PROJECT_VERSION, and REGRESSIONTEST_BRANCH specifies the name of the
 # gerrit.gromacs.org branch whose HEAD can test this code, *if* this
index 589ccc9974a421f9b0e2b85784a934562c744ed6..fb611ffd205dda1b6af090c0c0d51e4056caaacd 100644 (file)
@@ -60,6 +60,12 @@ status_code: ${status_code}
 status_string: ${status_string}
 log: ${log}")
     endif()
+    if(NOT "${PROJECT_VERSION}" MATCHES "-dev")
+        file(MD5 ${REGRESSIONTEST_FILE} COMPUTED_MD5SUM)
+        if(NOT ${REGRESSIONTEST_MD5SUM} STREQUAL ${COMPUTED_MD5SUM})
+            message(FATAL_ERROR "Download of regressiontests failed. Expected MD5 of ${REGRESSIONTEST_MD5SUM} but download has ${COMPUTED_MD5SUM}")
+        endif()
+    endif()
 
     file(REMOVE_RECURSE "${REGRESSIONTEST_PATH}") #delete potential prior folder
     execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${REGRESSIONTEST_FILE}"