Browse Source

ENH: fix failing tests

Bill Hoffman 19 years ago
parent
commit
4ddcdbed9a
2 changed files with 18 additions and 4 deletions
  1. 9 2
      Tests/SimpleInstall/CMakeLists.txt
  2. 9 2
      Tests/SimpleInstallS2/CMakeLists.txt

+ 9 - 2
Tests/SimpleInstall/CMakeLists.txt

@@ -187,11 +187,18 @@ IF(UNIX AND NOT APPLE)
     ENDIF(NOT file_command)
     ENDIF(NOT file_command)
     EXECUTE_PROCESS(COMMAND ${file_command} ${found_compress}
     EXECUTE_PROCESS(COMMAND ${file_command} ${found_compress}
       OUTPUT_VARIABLE output)
       OUTPUT_VARIABLE output)
-    if(NOT "${output}" MATCHES "script")
+    set(SKIP_TZ FALSE)
+    if("${output}" MATCHES "script")
+      set(SKIP_TZ TRUE)
+    endif("${output}" MATCHES "script")
+    if("${output}" MATCHES "dummy.sh")
+      set(SKIP_TZ TRUE)
+    endif("${output}" MATCHES "dummy.sh")
+    if(NOT SKIP_TZ)
       message("compress found and it was not a script")
       message("compress found and it was not a script")
       message("output from file command: [${output}]")
       message("output from file command: [${output}]")
       SET(CPACK_GENERATOR "${CPACK_GENERATOR};TZ")
       SET(CPACK_GENERATOR "${CPACK_GENERATOR};TZ")
-    else(NOT "${output}" MATCHES "script")
+    else(NOT SKIP_TZ)
       message("compress found, but it was a script so dont use it")
       message("compress found, but it was a script so dont use it")
       message("output from file command: [${output}]")
       message("output from file command: [${output}]")
     endif(NOT "${output}" MATCHES "script")
     endif(NOT "${output}" MATCHES "script")

+ 9 - 2
Tests/SimpleInstallS2/CMakeLists.txt

@@ -187,11 +187,18 @@ IF(UNIX AND NOT APPLE)
     ENDIF(NOT file_command)
     ENDIF(NOT file_command)
     EXECUTE_PROCESS(COMMAND ${file_command} ${found_compress}
     EXECUTE_PROCESS(COMMAND ${file_command} ${found_compress}
       OUTPUT_VARIABLE output)
       OUTPUT_VARIABLE output)
-    if(NOT "${output}" MATCHES "script")
+    set(SKIP_TZ FALSE)
+    if("${output}" MATCHES "script")
+      set(SKIP_TZ TRUE)
+    endif("${output}" MATCHES "script")
+    if("${output}" MATCHES "dummy.sh")
+      set(SKIP_TZ TRUE)
+    endif("${output}" MATCHES "dummy.sh")
+    if(NOT SKIP_TZ)
       message("compress found and it was not a script")
       message("compress found and it was not a script")
       message("output from file command: [${output}]")
       message("output from file command: [${output}]")
       SET(CPACK_GENERATOR "${CPACK_GENERATOR};TZ")
       SET(CPACK_GENERATOR "${CPACK_GENERATOR};TZ")
-    else(NOT "${output}" MATCHES "script")
+    else(NOT SKIP_TZ)
       message("compress found, but it was a script so dont use it")
       message("compress found, but it was a script so dont use it")
       message("output from file command: [${output}]")
       message("output from file command: [${output}]")
     endif(NOT "${output}" MATCHES "script")
     endif(NOT "${output}" MATCHES "script")