Просмотр исходного кода

ENH: finally fix the failing test on the dashboard for the past month or so

Bill Hoffman 19 лет назад
Родитель
Сommit
bba6583942
2 измененных файлов с 14 добавлено и 2 удалено
  1. 7 1
      Tests/SimpleInstall/CMakeLists.txt
  2. 7 1
      Tests/SimpleInstallS2/CMakeLists.txt

+ 7 - 1
Tests/SimpleInstall/CMakeLists.txt

@@ -182,7 +182,13 @@ IF(UNIX AND NOT APPLE)
   FIND_PROGRAM(found_compress
   FIND_PROGRAM(found_compress
     NAMES compress)
     NAMES compress)
   IF(found_compress)
   IF(found_compress)
-    SET(CPACK_GENERATOR "${CPACK_GENERATOR};TZ")
+    EXECUTE_PROCESS(COMMAND file ${found_compress} OUTPUT_VARIABLE output)
+    if(NOT "${output}" MATCHES "script")
+      message("compress found and it was not a script")
+      SET(CPACK_GENERATOR "${CPACK_GENERATOR};TZ")
+    else(NOT "${output}" MATCHES "script")
+      message("compress found, but it was a script so dont use it")
+    endif(NOT "${output}" MATCHES "script")
   ENDIF(found_compress)
   ENDIF(found_compress)
   FIND_PROGRAM(found_bz2
   FIND_PROGRAM(found_bz2
     NAMES bzip2)
     NAMES bzip2)

+ 7 - 1
Tests/SimpleInstallS2/CMakeLists.txt

@@ -182,7 +182,13 @@ IF(UNIX AND NOT APPLE)
   FIND_PROGRAM(found_compress
   FIND_PROGRAM(found_compress
     NAMES compress)
     NAMES compress)
   IF(found_compress)
   IF(found_compress)
-    SET(CPACK_GENERATOR "${CPACK_GENERATOR};TZ")
+    EXECUTE_PROCESS(COMMAND file ${found_compress} OUTPUT_VARIABLE output)
+    if(NOT "${output}" MATCHES "script")
+      message("compress found and it was not a script")
+      SET(CPACK_GENERATOR "${CPACK_GENERATOR};TZ")
+    else(NOT "${output}" MATCHES "script")
+      message("compress found, but it was a script so dont use it")
+    endif(NOT "${output}" MATCHES "script")
   ENDIF(found_compress)
   ENDIF(found_compress)
   FIND_PROGRAM(found_bz2
   FIND_PROGRAM(found_bz2
     NAMES bzip2)
     NAMES bzip2)