From ea30f2156b29d7754eae6a58e8824f121f5e2d39 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 3 Feb 2014 16:59:26 -0500 Subject: [svn-r24680] Remove acknowledgment file from install. Remove obsolete CPack.cmake file. Merge h5repack and h5mkgrp test folder changes from trunk. Tested: local linux --- CMakeInstallation.cmake | 20 +- MANIFEST | 1 - config/cmake/CPack.cmake | 588 --------------------- config/cmake/NSIS.template.in | 7 +- tools/h5repack/CMakeTests.cmake | 48 +- tools/h5repack/h5repack.sh.in | 59 ++- tools/h5repack/h5repack_plugin.sh.in | 50 +- .../testfiles/deflate_limit.h5repack_layout.h5.ddl | 2 +- .../testfiles/h5repack_layout.h5-plugin_test.ddl | 2 +- tools/misc/testh5mkgrp.sh.in | 2 +- 10 files changed, 109 insertions(+), 670 deletions(-) delete mode 100644 config/cmake/CPack.cmake diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index a0a6f3d..0d071e7 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -142,7 +142,6 @@ ENDIF (HDF5_PACK_EXAMPLES) IF (NOT HDF5_EXTERNALLY_CONFIGURED) INSTALL ( FILES - ${HDF5_SOURCE_DIR}/ACKNOWLEDGMENTS ${HDF5_SOURCE_DIR}/COPYING DESTINATION ${HDF5_INSTALL_DATA_DIR} COMPONENT hdfdocuments @@ -215,12 +214,23 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) SET (CPACK_GENERATOR "TGZ") IF (WIN32) LIST (APPEND CPACK_GENERATOR "NSIS") + # Installers for 32- vs. 64-bit CMake: + # - Root install directory (displayed to end user at installer-run time) + # - "NSIS package/display name" (text used in the installer GUI) + # - Registry key used to store info about the installation + IF (CMAKE_CL_64) + SET (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") + SET (CPACK_NSIS_PACKAGE_NAME "${HDF5_PACKAGE_STRING} (Win64)") + SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${HDF5_PACKAGE_STRING}-${LIB_TYPE} (Win64)") + ELSE (CMAKE_CL_64) + SET (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES") + SET (CPACK_NSIS_PACKAGE_NAME "${HDF5_PACKAGE_STRING}") + SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${HDF5_PACKAGE_STRING}-${LIB_TYPE}") + ENDIF (CMAKE_CL_64) SET (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${CPACK_PACKAGE_VERSION}") - SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${LIB_TYPE}") SET (CPACK_MONOLITHIC_INSTALL ON) SET (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}") SET (CPACK_NSIS_MODIFY_PATH ON) - SET (CPACK_NSIS_PACKAGE_NAME "HDF5 ${CPACK_PACKAGE_VERSION}") ELSEIF (APPLE) LIST (APPEND CPACK_GENERATOR "DragNDrop") SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) @@ -288,6 +298,10 @@ The HDF5 data model, file format, API, library, and tools are open and distribut # SET (CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec") ENDIF (WIN32) + # By default, do not warn when built on machines using only VS Express: + IF (NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS) + SET (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON) + ENDIF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS) INCLUDE(InstallRequiredSystemLibraries) SET (CPACK_INSTALL_CMAKE_PROJECTS "${HDF5_BINARY_DIR};HDF5;ALL;/") diff --git a/MANIFEST b/MANIFEST index 37b9d00..8b5808e 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2294,7 +2294,6 @@ ./config/cmake/vfdTest.cmake ./config/cmake/CTestCustom.cmake ./config/cmake/ConfigureChecks.cmake -./config/cmake/CPack.cmake ./config/cmake/CPack.Info.plist.in ./config/cmake/hdf.gif ./config/cmake/NSIS.template.in diff --git a/config/cmake/CPack.cmake b/config/cmake/CPack.cmake deleted file mode 100644 index bdfa5b8..0000000 --- a/config/cmake/CPack.cmake +++ /dev/null @@ -1,588 +0,0 @@ -##section Variables common to all CPack generators -##end -##module -# - Build binary and source package installers. -# The CPack module generates binary and source installers in a variety -# of formats using the cpack program. Inclusion of the CPack module -# adds two new targets to the resulting makefiles, package and -# package_source, which build the binary and source installers, -# respectively. The generated binary installers contain everything -# installed via CMake's INSTALL command (and the deprecated -# INSTALL_FILES, INSTALL_PROGRAMS, and INSTALL_TARGETS commands). -# -# For certain kinds of binary installers (including the graphical -# installers on Mac OS X and Windows), CPack generates installers that -# allow users to select individual application components to -# install. See CPackComponent module for that. -# -# The CPACK_GENERATOR variable has different meanings in different -# contexts. In your CMakeLists.txt file, CPACK_GENERATOR is a -# *list of generators*: when run with no other arguments, CPack -# will iterate over that list and produce one package for each -# generator. In a CPACK_PROJECT_CONFIG_FILE, though, CPACK_GENERATOR -# is a *string naming a single generator*. If you need per-cpack- -# generator logic to control *other* cpack settings, then you need -# a CPACK_PROJECT_CONFIG_FILE. -# -# The CMake source tree itself contains a CPACK_PROJECT_CONFIG_FILE. -# See the top level file CMakeCPackOptions.cmake.in for an example. -# -# If set, the CPACK_PROJECT_CONFIG_FILE is included automatically -# on a per-generator basis. It only need contain overrides. -# -# Here's how it works: -# - cpack runs -# - it includes CPackConfig.cmake -# - it iterates over the generators listed in that file's -# CPACK_GENERATOR list variable (unless told to use just a -# specific one via -G on the command line...) -# -# - foreach generator, it then -# - sets CPACK_GENERATOR to the one currently being iterated -# - includes the CPACK_PROJECT_CONFIG_FILE -# - produces the package for that generator -# -# This is the key: For each generator listed in CPACK_GENERATOR -# in CPackConfig.cmake, cpack will *reset* CPACK_GENERATOR -# internally to *the one currently being used* and then include -# the CPACK_PROJECT_CONFIG_FILE. -# -# Before including this CPack module in your CMakeLists.txt file, -# there are a variety of variables that can be set to customize -# the resulting installers. The most commonly-used variables are: -##end -# -##variable -# CPACK_PACKAGE_NAME - The name of the package (or application). If -# not specified, defaults to the project name. -##end -# -##variable -# CPACK_PACKAGE_VENDOR - The name of the package vendor. (e.g., -# "Kitware"). -##end -# -##variable -# CPACK_PACKAGE_DIRECTORY - The directory in which CPack is doing its -# packaging. If it is not set then this will default (internally) to the -# build dir. This variable may be defined in CPack config file or from -# the cpack command line option "-B". If set the command line option -# override the value found in the config file. -##end -# -##variable -# CPACK_PACKAGE_VERSION_MAJOR - Package major Version -##end -# -##variable -# CPACK_PACKAGE_VERSION_MINOR - Package minor Version -##end -# -##variable -# CPACK_PACKAGE_VERSION_PATCH - Package patch Version -##end -# -##variable -# CPACK_PACKAGE_DESCRIPTION_FILE - A text file used to describe the -# project. Used, for example, the introduction screen of a -# CPack-generated Windows installer to describe the project. -##end -# -##variable -# CPACK_PACKAGE_DESCRIPTION_SUMMARY - Short description of the -# project (only a few words). -##end -# -##variable -# CPACK_PACKAGE_FILE_NAME - The name of the package file to generate, -# not including the extension. For example, cmake-2.6.1-Linux-i686. -# The default value is -# -# ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}. -##end -# -##variable -# CPACK_PACKAGE_INSTALL_DIRECTORY - Installation directory on the -# target system. This may be used by some CPack generators -# like NSIS to create an installation directory e.g., "CMake 2.5" -# below the installation prefix. All installed element will be -# put inside this directory. -##end -# -##variable -# CPACK_PACKAGE_ICON - A branding image that will be displayed inside -# the installer (used by GUI installers). -##end -# -##variable -# CPACK_PROJECT_CONFIG_FILE - CPack-time project CPack configuration -# file. This file included at cpack time, once per -# generator after CPack has set CPACK_GENERATOR to the actual generator -# being used. It allows per-generator setting of CPACK_* variables at -# cpack time. -##end -# -##variable -# CPACK_RESOURCE_FILE_LICENSE - License to be embedded in the installer. It -# will typically be displayed to the user by the produced installer -# (often with an explicit "Accept" button, for graphical installers) -# prior to installation. This license file is NOT added to installed -# file but is used by some CPack generators like NSIS. If you want -# to install a license file (may be the same as this one) -# along with your project you must add an appropriate CMake INSTALL -# command in your CMakeLists.txt. -##end -# -##variable -# CPACK_RESOURCE_FILE_README - ReadMe file to be embedded in the installer. It -# typically describes in some detail the purpose of the project -# during the installation. Not all CPack generators uses -# this file. -##end -# -##variable -# CPACK_RESOURCE_FILE_WELCOME - Welcome file to be embedded in the -# installer. It welcomes users to this installer. -# Typically used in the graphical installers on Windows and Mac OS X. -##end -# -##variable -# CPACK_MONOLITHIC_INSTALL - Disables the component-based -# installation mechanism. When set the component specification is ignored -# and all installed items are put in a single "MONOLITHIC" package. -# Some CPack generators do monolithic packaging by default and -# may be asked to do component packaging by setting -# CPACK__COMPONENT_INSTALL to 1/TRUE. -##end -# -##variable -# CPACK_GENERATOR - List of CPack generators to use. If not -# specified, CPack will create a set of options CPACK_BINARY_ (e.g., -# CPACK_BINARY_NSIS) allowing the user to enable/disable individual -# generators. This variable may be used on the command line -# as well as in: -# -# cpack -D CPACK_GENERATOR="ZIP;TGZ" /path/to/build/tree -##end -# -##variable -# CPACK_OUTPUT_CONFIG_FILE - The name of the CPack binary configuration -# file. This file is the CPack configuration generated by the CPack module -# for binary installers. Defaults to CPackConfig.cmake. -##end -# -##variable -# CPACK_PACKAGE_EXECUTABLES - Lists each of the executables and associated -# text label to be used to create Start Menu shortcuts. For example, -# setting this to the list ccmake;CMake will -# create a shortcut named "CMake" that will execute the installed -# executable ccmake. Not all CPack generators use it (at least NSIS and -# OSXX11 do). -##end -# -##variable -# CPACK_STRIP_FILES - List of files to be stripped. Starting with -# CMake 2.6.0 CPACK_STRIP_FILES will be a boolean variable which -# enables stripping of all files (a list of files evaluates to TRUE -# in CMake, so this change is compatible). -##end -# -# The following CPack variables are specific to source packages, and -# will not affect binary packages: -# -##variable -# CPACK_SOURCE_PACKAGE_FILE_NAME - The name of the source package. For -# example cmake-2.6.1. -##end -# -##variable -# CPACK_SOURCE_STRIP_FILES - List of files in the source tree that -# will be stripped. Starting with CMake 2.6.0 -# CPACK_SOURCE_STRIP_FILES will be a boolean variable which enables -# stripping of all files (a list of files evaluates to TRUE in CMake, -# so this change is compatible). -##end -# -##variable -# CPACK_SOURCE_GENERATOR - List of generators used for the source -# packages. As with CPACK_GENERATOR, if this is not specified then -# CPack will create a set of options (e.g., CPACK_SOURCE_ZIP) -# allowing users to select which packages will be generated. -##end -# -##variable -# CPACK_SOURCE_OUTPUT_CONFIG_FILE - The name of the CPack source -# configuration file. This file is the CPack configuration generated by the -# CPack module for source installers. Defaults to CPackSourceConfig.cmake. -##end -# -##variable -# CPACK_SOURCE_IGNORE_FILES - Pattern of files in the source tree -# that won't be packaged when building a source package. This is a -# list of regular expression patterns (that must be properly escaped), -# e.g., /CVS/;/\\.svn/;\\.swp$;\\.#;/#;.*~;cscope.* -##end -# -# The following variables are for advanced uses of CPack: -# -##variable -# CPACK_CMAKE_GENERATOR - What CMake generator should be used if the -# project is CMake project. Defaults to the value of CMAKE_GENERATOR -# few users will want to change this setting. -##end -# -##variable -# CPACK_INSTALL_CMAKE_PROJECTS - List of four values that specify -# what project to install. The four values are: Build directory, -# Project Name, Project Component, Directory. If omitted, CPack will -# build an installer that installers everything. -##end -# -##variable -# CPACK_SYSTEM_NAME - System name, defaults to the value of -# ${CMAKE_SYSTEM_NAME}. -##end -# -##variable -# CPACK_PACKAGE_VERSION - Package full version, used internally. By -# default, this is built from CPACK_PACKAGE_VERSION_MAJOR, -# CPACK_PACKAGE_VERSION_MINOR, and CPACK_PACKAGE_VERSION_PATCH. -##end -# -##variable -# CPACK_TOPLEVEL_TAG - Directory for the installed files. -##end -# -##variable -# CPACK_INSTALL_COMMANDS - Extra commands to install components. -##end -# -##variable -# CPACK_INSTALLED_DIRECTORIES - Extra directories to install. -##end -# -##variable -# CPACK_PACKAGE_INSTALL_REGISTRY_KEY - Registry key used when -# installing this project. This is only used -# by installer for Windows. -##end -##variable -# CPACK_CREATE_DESKTOP_LINKS - List of desktop links to create. -##end -# - -#============================================================================= -# Copyright 2006-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -# Define this var in order to avoid (or warn) concerning multiple inclusion -if(CPack_CMake_INCLUDED) - message(WARNING "CPack.cmake has already been included!!") -else() - set(CPack_CMake_INCLUDED 1) -endif() - -# Pick a configuration file -set(cpack_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in") -if(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in") - set(cpack_input_file "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in") -endif() -set(cpack_source_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in") -if(EXISTS "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in") - set(cpack_source_input_file "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in") -endif() - -# Backward compatibility -# Include CPackComponent macros if it has not already been included before. -include(CPackComponent) - -# Macro for setting values if a user did not overwrite them -macro(cpack_set_if_not_set name value) - if(NOT DEFINED "${name}") - set(${name} "${value}") - endif() -endmacro() - -# cpack_encode_variables - Macro to encode variables for the configuration file -# find any variable that starts with CPACK and create a variable -# _CPACK_OTHER_VARIABLES_ that contains SET commands for -# each cpack variable. _CPACK_OTHER_VARIABLES_ is then -# used as an @ replacment in configure_file for the CPackConfig. -macro(cpack_encode_variables) - set(_CPACK_OTHER_VARIABLES_) - get_cmake_property(res VARIABLES) - foreach(var ${res}) - if("xxx${var}" MATCHES "xxxCPACK") - set(_CPACK_OTHER_VARIABLES_ - "${_CPACK_OTHER_VARIABLES_}\nSET(${var} \"${${var}}\")") - endif() - endforeach() -endmacro() - -# Set the package name -cpack_set_if_not_set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}") -cpack_set_if_not_set(CPACK_PACKAGE_VERSION_MAJOR "0") -cpack_set_if_not_set(CPACK_PACKAGE_VERSION_MINOR "1") -cpack_set_if_not_set(CPACK_PACKAGE_VERSION_PATCH "1") -cpack_set_if_not_set(CPACK_PACKAGE_VERSION - "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") -cpack_set_if_not_set(CPACK_PACKAGE_VENDOR "Humanity") -cpack_set_if_not_set(CPACK_PACKAGE_DESCRIPTION_SUMMARY - "${CMAKE_PROJECT_NAME} built using CMake") - -cpack_set_if_not_set(CPACK_PACKAGE_DESCRIPTION_FILE - "${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt") -cpack_set_if_not_set(CPACK_RESOURCE_FILE_LICENSE - "${CMAKE_ROOT}/Templates/CPack.GenericLicense.txt") -cpack_set_if_not_set(CPACK_RESOURCE_FILE_README - "${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt") -cpack_set_if_not_set(CPACK_RESOURCE_FILE_WELCOME - "${CMAKE_ROOT}/Templates/CPack.GenericWelcome.txt") - -cpack_set_if_not_set(CPACK_MODULE_PATH "${CMAKE_MODULE_PATH}") - -if(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL) - set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) -endif() - -if(CPACK_NSIS_MODIFY_PATH) - set(CPACK_NSIS_MODIFY_PATH ON) -endif() - -set(__cpack_system_name ${CMAKE_SYSTEM_NAME}) -if(${__cpack_system_name} MATCHES Windows) - if(CMAKE_CL_64) - set(__cpack_system_name win64) - else() - set(__cpack_system_name win32) - endif() -endif() -cpack_set_if_not_set(CPACK_SYSTEM_NAME "${__cpack_system_name}") - -# Root dir: default value should be the string literal "$PROGRAMFILES" -# for backwards compatibility. Projects may set this value to anything. -if(CMAKE_CL_64) -set(__cpack_root_default "$PROGRAMFILES64") -else() -set(__cpack_root_default "$PROGRAMFILES") -endif() -cpack_set_if_not_set(CPACK_NSIS_INSTALL_ROOT "${__cpack_root_default}") - -# -..--. -cpack_set_if_not_set(CPACK_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}") -cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_DIRECTORY - "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}") -cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY - "${CPACK_PACKAGE_INSTALL_DIRECTORY}") -cpack_set_if_not_set(CPACK_PACKAGE_DEFAULT_LOCATION "/") -cpack_set_if_not_set(CPACK_PACKAGE_RELOCATABLE "true") - -# always force to exactly "true" or "false" for CPack.Info.plist.in: -if(CPACK_PACKAGE_RELOCATABLE) - set(CPACK_PACKAGE_RELOCATABLE "true") -else() - set(CPACK_PACKAGE_RELOCATABLE "false") -endif() - -macro(cpack_check_file_exists file description) - if(NOT EXISTS "${file}") - message(SEND_ERROR "CPack ${description} file: \"${file}\" could not be found.") - endif() -endmacro() - -cpack_check_file_exists("${CPACK_PACKAGE_DESCRIPTION_FILE}" "package description") -cpack_check_file_exists("${CPACK_RESOURCE_FILE_LICENSE}" "license resource") -cpack_check_file_exists("${CPACK_RESOURCE_FILE_README}" "readme resource") -cpack_check_file_exists("${CPACK_RESOURCE_FILE_WELCOME}" "welcome resource") - -macro(cpack_optional_append _list _cond _item) - if(${_cond}) - set(${_list} ${${_list}} ${_item}) - endif() -endmacro() - -##variable -# CPACK_BINARY_ - CPack generated options for binary generators. The -# CPack.cmake module generates (when CPACK_GENERATOR is not set) -# a set of CMake options (see CMake option command) which may then be used to -# select the CPack generator(s) to be used when launching the package target. -##end -# Provide options to choose generators -# we might check here if the required tools for the generates exist -# and set the defaults according to the results -if(NOT CPACK_GENERATOR) - if(UNIX) - if(CYGWIN) - option(CPACK_BINARY_CYGWIN "Enable to build Cygwin binary packages" ON) - else() - if(APPLE) - option(CPACK_BINARY_BUNDLE "Enable to build OSX bundles" OFF) - option(CPACK_BINARY_DRAGNDROP "Enable to build OSX Drag And Drop package" OFF) - option(CPACK_BINARY_PACKAGEMAKER "Enable to build PackageMaker packages" ON) - option(CPACK_BINARY_OSXX11 "Enable to build OSX X11 packages" OFF) - else() - option(CPACK_BINARY_TZ "Enable to build TZ packages" ON) - endif() - option(CPACK_BINARY_STGZ "Enable to build STGZ packages" ON) - option(CPACK_BINARY_TGZ "Enable to build TGZ packages" ON) - option(CPACK_BINARY_TBZ2 "Enable to build TBZ2 packages" OFF) - option(CPACK_BINARY_DEB "Enable to build Debian packages" OFF) - option(CPACK_BINARY_RPM "Enable to build RPM packages" OFF) - option(CPACK_BINARY_NSIS "Enable to build NSIS packages" OFF) - endif() - else() - option(CPACK_BINARY_NSIS "Enable to build NSIS packages" ON) - option(CPACK_BINARY_WIX "Enable to build WiX packages" OFF) - option(CPACK_BINARY_ZIP "Enable to build ZIP packages" OFF) - endif() - - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_BUNDLE Bundle) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_DRAGNDROP DragNDrop) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_PACKAGEMAKER PackageMaker) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_OSXX11 OSXX11) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_CYGWIN CygwinBinary) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_DEB DEB) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_RPM RPM) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_NSIS NSIS) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_STGZ STGZ) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TGZ TGZ) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TBZ2 TBZ2) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TZ TZ) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_WIX WIX) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_ZIP ZIP) - -endif() - -# Provide options to choose source generators -if(NOT CPACK_SOURCE_GENERATOR) - if(UNIX) - if(CYGWIN) - option(CPACK_SOURCE_CYGWIN "Enable to build Cygwin source packages" ON) - else() - option(CPACK_SOURCE_TBZ2 "Enable to build TBZ2 source packages" ON) - option(CPACK_SOURCE_TGZ "Enable to build TGZ source packages" ON) - option(CPACK_SOURCE_TZ "Enable to build TZ source packages" ON) - option(CPACK_SOURCE_ZIP "Enable to build ZIP source packages" OFF) - endif() - else() - option(CPACK_SOURCE_ZIP "Enable to build ZIP source packages" ON) - endif() - - cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_CYGWIN CygwinSource) - cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TGZ TGZ) - cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TBZ2 TBZ2) - cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TZ TZ) - cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_ZIP ZIP) -endif() - -# mark the above options as advanced -mark_as_advanced(CPACK_BINARY_CYGWIN CPACK_BINARY_PACKAGEMAKER CPACK_BINARY_OSXX11 - CPACK_BINARY_STGZ CPACK_BINARY_TGZ CPACK_BINARY_TBZ2 - CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ - CPACK_BINARY_NSIS CPACK_BINARY_WIX CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE - CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ - CPACK_SOURCE_TZ CPACK_SOURCE_ZIP CPACK_BINARY_DRAGNDROP) - -# Set some other variables -cpack_set_if_not_set(CPACK_INSTALL_CMAKE_PROJECTS - "${CMAKE_BINARY_DIR};${CMAKE_PROJECT_NAME};ALL;/") -cpack_set_if_not_set(CPACK_CMAKE_GENERATOR "${CMAKE_GENERATOR}") -cpack_set_if_not_set(CPACK_TOPLEVEL_TAG "${CPACK_SYSTEM_NAME}") -# if the user has set CPACK_NSIS_DISPLAY_NAME remember it -if(DEFINED CPACK_NSIS_DISPLAY_NAME) - set(CPACK_NSIS_DISPLAY_NAME_SET TRUE) -endif() -# if the user has set CPACK_NSIS_DISPLAY -# explicitly, then use that as the default -# value of CPACK_NSIS_PACKAGE_NAME instead -# of CPACK_PACKAGE_INSTALL_DIRECTORY -cpack_set_if_not_set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}") - -if(CPACK_NSIS_DISPLAY_NAME_SET) - string(REPLACE "\\" "\\\\" - _NSIS_DISPLAY_NAME_TMP "${CPACK_NSIS_DISPLAY_NAME}") - cpack_set_if_not_set(CPACK_NSIS_PACKAGE_NAME "${_NSIS_DISPLAY_NAME_TMP}") -else() - cpack_set_if_not_set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}") -endif() - -cpack_set_if_not_set(CPACK_OUTPUT_CONFIG_FILE - "${CMAKE_BINARY_DIR}/CPackConfig.cmake") - -cpack_set_if_not_set(CPACK_SOURCE_OUTPUT_CONFIG_FILE - "${CMAKE_BINARY_DIR}/CPackSourceConfig.cmake") - -cpack_set_if_not_set(CPACK_SET_DESTDIR OFF) -cpack_set_if_not_set(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") - -cpack_set_if_not_set(CPACK_NSIS_INSTALLER_ICON_CODE "") -cpack_set_if_not_set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "") - -# WiX specific variables -cpack_set_if_not_set(CPACK_WIX_SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P}") - -if(DEFINED CPACK_COMPONENTS_ALL) - if(CPACK_MONOLITHIC_INSTALL) - message("CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic installation.") - set(CPACK_COMPONENTS_ALL) - else() - # The user has provided the set of components to be installed as - # part of a component-based installation; trust her. - set(CPACK_COMPONENTS_ALL_SET_BY_USER TRUE) - endif() -else() - # If the user has not specifically requested a monolithic installer - # but has specified components in various "install" commands, tell - # CPack about those components. - if(NOT CPACK_MONOLITHIC_INSTALL) - get_cmake_property(CPACK_COMPONENTS_ALL COMPONENTS) - list(LENGTH CPACK_COMPONENTS_ALL CPACK_COMPONENTS_LEN) - if(CPACK_COMPONENTS_LEN EQUAL 1) - # Only one component: this is not a component-based installation - # (at least, it isn't a component-based installation, but may - # become one later if the user uses the cpack_add_* commands). - set(CPACK_COMPONENTS_ALL) - endif() - set(CPACK_COMPONENTS_LEN) - endif() -endif() - -# CMake always generates a component named "Unspecified", which is -# used to install everything that doesn't have an explicitly-provided -# component. Since these files should always be installed, we'll make -# them hidden and required. -set(CPACK_COMPONENT_UNSPECIFIED_HIDDEN TRUE) -set(CPACK_COMPONENT_UNSPECIFIED_REQUIRED TRUE) - -cpack_encode_variables() -configure_file("${cpack_input_file}" "${CPACK_OUTPUT_CONFIG_FILE}" @ONLY IMMEDIATE) - -# Generate source file -cpack_set_if_not_set(CPACK_SOURCE_INSTALLED_DIRECTORIES - "${CMAKE_SOURCE_DIR};/") -cpack_set_if_not_set(CPACK_SOURCE_TOPLEVEL_TAG "${CPACK_SYSTEM_NAME}-Source") -cpack_set_if_not_set(CPACK_SOURCE_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-Source") -cpack_set_if_not_set(CPACK_SOURCE_IGNORE_FILES - "/CVS/;/\\\\\\\\.svn/;/\\\\\\\\.bzr/;/\\\\\\\\.hg/;/\\\\\\\\.git/;\\\\\\\\.swp$;\\\\\\\\.#;/#") -set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_SOURCE_INSTALL_CMAKE_PROJECTS}") -set(CPACK_INSTALLED_DIRECTORIES "${CPACK_SOURCE_INSTALLED_DIRECTORIES}") -set(CPACK_GENERATOR "${CPACK_SOURCE_GENERATOR}") -set(CPACK_TOPLEVEL_TAG "${CPACK_SOURCE_TOPLEVEL_TAG}") -set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}") -set(CPACK_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}") -set(CPACK_STRIP_FILES "${CPACK_SOURCE_STRIP_FILES}") - -cpack_encode_variables() -configure_file("${cpack_source_input_file}" - "${CPACK_SOURCE_OUTPUT_CONFIG_FILE}" @ONLY IMMEDIATE) diff --git a/config/cmake/NSIS.template.in b/config/cmake/NSIS.template.in index 59a444b..ecced05 100644 --- a/config/cmake/NSIS.template.in +++ b/config/cmake/NSIS.template.in @@ -37,9 +37,6 @@ ;Set compression SetCompressor @CPACK_NSIS_COMPRESSOR@ - ;Require administrator access - RequestExecutionLevel admin - @CPACK_NSIS_DEFINES@ !include Sections.nsh @@ -916,7 +913,9 @@ Function .onInit ;Run the uninstaller uninst: ClearErrors - ExecWait '$0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file + StrLen $2 "\Uninstall.exe" + StrCpy $3 $0 -$2 # remove "\Uninstall.exe" from UninstallString to get path + ExecWait '$0 _?=$3' ;Do not copy the uninstaller to a temp file IfErrors uninst_failed inst uninst_failed: diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake index 7f8f71b..46d46aa 100644 --- a/tools/h5repack/CMakeTests.cmake +++ b/tools/h5repack/CMakeTests.cmake @@ -206,12 +206,12 @@ NAME H5REPACK_CMP-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${ARGN};testfiles/${resultfile};testfiles/out-${testname}.${resultfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${resultfile}-${testname}.out" + -D "TEST_ARGS:STRING=${ARGN};${resultfile};out-${testname}.${resultfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${resultfile}-${testname}.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_FILTER:STRING=${testfilter}" - -D "TEST_REFERENCE=testfiles/${resultfile}.tst" + -D "TEST_REFERENCE=${resultfile}.tst" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) ENDIF (HDF5_ENABLE_USING_MEMCHECKER) @@ -242,11 +242,11 @@ NAME H5REPACK_DMP-h5dump-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=-pH;./testfiles/out-${testname}.${resultfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${resultfile}-${testname}.out" + -D "TEST_ARGS:STRING=-pH;out-${testname}.${resultfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${resultfile}-${testname}.out" -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=testfiles/${testname}.${resultfile}.ddl" + -D "TEST_REFERENCE=${testname}.${resultfile}.ddl" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) SET_TESTS_PROPERTIES (H5REPACK_DMP-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_DMP-${testname}") @@ -281,9 +281,9 @@ NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=-d;${testdset};-pH;testfiles/out-${testname}.${testfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${testfile}-${testname}-v.out" + -D "TEST_ARGS:STRING=-d;${testdset};-pH;out-${testname}.${testfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${testfile}-${testname}-v.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_FILTER:STRING=${testfilter}" -D "TEST_REFERENCE=${testfilter}" @@ -304,9 +304,9 @@ NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=-pH;testfiles/out-${testname}.${testfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${testfile}-${testname}-v.out" + -D "TEST_ARGS:STRING=-pH;out-${testname}.${testfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${testfile}-${testname}-v.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_FILTER:STRING=${nottestfilter}" -D "TEST_REFERENCE=${testfilter}" @@ -341,7 +341,7 @@ IF (HDF5_BUILD_TOOLS AND NOT HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run ADD_TEST ( - NAME H5REPACK_UD-clearall-objects + NAME H5REPACK_UD-${testname}-clearall-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile} @@ -354,26 +354,26 @@ NAME H5REPACK_UD-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${ARGN};${PROJECT_BINARY_DIR}/testfiles/${resultfile};${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_ARGS:STRING=${ARGN};${resultfile};out-${testname}.${resultfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" -D "TEST_EXPECT=${resultcode}" -D "TEST_FILTER:STRING=O?...ing file[^\n]+\n" - -D "TEST_OUTPUT=./testfiles/${testname}.${resultfile}.out" - -D "TEST_REFERENCE=testfiles/${testname}.${resultfile}.tst" + -D "TEST_OUTPUT=${testname}.${resultfile}.out" + -D "TEST_REFERENCE=${testname}.${resultfile}.tst" -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH" -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) - SET_TESTS_PROPERTIES (H5REPACK_UD-${testname} PROPERTIES DEPENDS H5REPACK_UD-clearall-objects) + SET_TESTS_PROPERTIES (H5REPACK_UD-${testname} PROPERTIES DEPENDS H5REPACK_UD-${testname}-clearall-objects) ADD_TEST ( NAME H5REPACK_UD-h5dump-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=-pH;testfiles/out-${testname}.${resultfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${resultfile}-${testname}.out" + -D "TEST_ARGS:STRING=-pH;out-${testname}.${resultfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${resultfile}-${testname}.out" -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=testfiles/${resultfile}-${testname}.ddl" + -D "TEST_REFERENCE=${resultfile}-${testname}.ddl" -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH" -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index 045aebf..a4d12bd 100644 --- a/tools/h5repack/h5repack.sh.in +++ b/tools/h5repack/h5repack.sh.in @@ -70,7 +70,7 @@ SRC_H5JAM_TESTFILES="$SRC_TOOLS/h5jam/testfiles" SRC_H5STAT_TESTFILES="$SRC_TOOLS/h5stat/testfiles" SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/h5import/testfiles" -TESTDIR=./testfiles +TESTDIR=./testpack test -d $TESTDIR || mkdir $TESTDIR ###################################################################### @@ -209,6 +209,7 @@ DIFFTEST() { VERIFY h5diff output $@ ( + cd $TESTDIR $RUNSERIAL $H5DIFF_BIN -q "$@" ) RET=$? @@ -229,14 +230,15 @@ DIFFTEST() TOOLTEST() { echo $@ - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 shift shift # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) RET=$? @@ -254,11 +256,11 @@ TOOLTEST() # Verifying layouts of a dataset VERIFY_LAYOUT_DSET() { - layoutfile=$TESTDIR/layout-$1.$2 + layoutfile=layout-$1.$2 dset=$3 expectlayout=$4 - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 shift shift shift @@ -266,6 +268,7 @@ VERIFY_LAYOUT_DSET() TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) RET=$? @@ -281,9 +284,10 @@ VERIFY_LAYOUT_DSET() # check the layout from a dataset VERIFY "a dataset layout" ( + cd $TESTDIR $RUNSERIAL $H5DUMP_BIN -d $dset -pH $outfile > $layoutfile ) - $GREP $expectlayout $layoutfile > /dev/null + $GREP $expectlayout $TESTDIR/$layoutfile > /dev/null if [ $? -eq 0 ]; then echo " PASSED" else @@ -301,8 +305,8 @@ VERIFY_LAYOUT_DSET() VERIFY_LAYOUT_ALL() { infile=$2 - outfile=$TESTDIR/out-$1.$2 - layoutfile=$TESTDIR/layout-$1.$2 + outfile=out-$1.$2 + layoutfile=layout-$1.$2 expectlayout=$3 shift shift @@ -310,6 +314,7 @@ VERIFY_LAYOUT_ALL() TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) RET=$? @@ -327,6 +332,7 @@ VERIFY_LAYOUT_ALL() # check if the other layouts still exsit VERIFY "layouts" ( + cd $TESTDIR echo # if CONTIGUOUS if [ $expectlayout = "CONTIGUOUS" ]; then @@ -401,14 +407,15 @@ VERIFY_LAYOUT_ALL() # TOOLTEST0() { - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 shift shift # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN -i $infile -o $outfile "$@" ) RET=$? @@ -428,14 +435,15 @@ TOOLTEST0() # TOOLTEST1() { - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 shift shift # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) RET=$? @@ -458,14 +466,15 @@ TOOLTESTV() actual="$TESTDIR/`basename $2 .ddl`.out" actual_err="$TESTDIR/`basename $2 .ddl`.err" - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 shift shift # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) >$actual 2>$actual_err RET=$? @@ -500,8 +509,8 @@ TOOLTESTV() # TOOLTEST_DUMP() { - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 expect="$TESTDIR/$1.$2.ddl" actual="$TESTDIR/out-$1.$2.out" actual_err="$TESTDIR/out-$1.$2.err" @@ -512,6 +521,7 @@ TOOLTEST_DUMP() # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) >$actual 2>$actual_err RET=$? @@ -522,6 +532,7 @@ TOOLTEST_DUMP() echo " PASSED" VERIFY h5dump output $@ ( + cd $TESTDIR $RUNSERIAL $H5DUMP_BIN -pH $outfile ) >$actual 2>$actual_err cat $actual_err >> $actual @@ -559,14 +570,15 @@ TOOLTEST_DUMP() # Verify the output file of second run is larger than the one of 1st run. TOOLTEST_META() { - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 shift shift # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN $infile $outfile ) RET=$? @@ -578,12 +590,13 @@ TOOLTEST_META() DIFFTEST $infile $outfile fi # get the size of the first output file - size1=`wc -c $outfile | cut -d' ' -f1` + size1=`wc -c $TESTDIR/$outfile | cut -d' ' -f1` # 2nd run with metadata option # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) RET=$? @@ -595,7 +608,7 @@ TOOLTEST_META() DIFFTEST $infile $outfile fi # get the size of the second output file - size2=`wc -c $outfile | cut -d' ' -f1` + size2=`wc -c $TESTDIR/$outfile | cut -d' ' -f1` # verify sizes. MESSAGE "Verify the sizes of both output files ($size1 vs $size2)" @@ -927,7 +940,7 @@ else fi #file -arg="h5repack_layout.h5 -e $TESTDIR/h5repack.info" +arg="h5repack_layout.h5 -e h5repack.info" if test $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else @@ -1064,7 +1077,7 @@ else fi # add a userblock to file -arg="h5repack_objs.h5 -u $TESTDIR/ublock.bin -b 2048" +arg="h5repack_objs.h5 -u ublock.bin -b 2048" TOOLTEST add_userblock $arg # add alignment diff --git a/tools/h5repack/h5repack_plugin.sh.in b/tools/h5repack/h5repack_plugin.sh.in index df4b374..750b05b 100644 --- a/tools/h5repack/h5repack_plugin.sh.in +++ b/tools/h5repack/h5repack_plugin.sh.in @@ -49,7 +49,7 @@ SRC_TOOLS="$srcdir/.." # testfiles source dirs for tools SRC_H5REPACK_TESTFILES="$SRC_TOOLS/h5repack/testfiles" -TESTDIR=testfiles +TESTDIR=testplug test -d $TESTDIR || mkdir $TESTDIR ###################################################################### @@ -88,7 +88,7 @@ if [ $? != 0 ]; then fi # setup plugin path -ENVCMD="env HDF5_PLUGIN_PATH=${PLUGIN_LIBDIR}" +ENVCMD="env HDF5_PLUGIN_PATH=../${PLUGIN_LIBDIR}" COPY_TESTFILES_TO_TESTDIR() { @@ -171,8 +171,8 @@ STDOUT_FILTER() { TOOLTEST_DUMP() { echo $@ - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 expect1="$TESTDIR/$1.$2.tst" actual1="$TESTDIR/$1.$2.out" actual1_err="$TESTDIR/$1.$2.err" @@ -186,35 +186,37 @@ TOOLTEST_DUMP() # Run test. TESTING $H5REPACK $@ ( - $ENVCMD $H5REPACK_BIN "$@" $infile $outfile + cd $TESTDIR + $ENVCMD $H5REPACK_BIN "$@" $infile $outfile ) >$actual1 2>$actual1_err RET=$? STDOUT_FILTER $actual1 cat $actual1_err >> $actual1 if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - if cmp -s $expect1 $actual1; then - echo " PASSED" - else echo "*FAILED*" - echo " Expected result (*.tst) differs from actual result (*.out)" nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && diff -c $expect1 $actual1 |sed 's/^/ /' - fi - VERIFY h5dump output -pH $outfile - ( + else + echo " PASSED" + if cmp -s $expect1 $actual1; then + echo " PASSED" + else + echo "*FAILED*" + echo " Expected result (*.tst) differs from actual result (*.out)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && diff -c $expect1 $actual1 |sed 's/^/ /' + fi + VERIFY h5dump output -pH $outfile + ( + cd $TESTDIR $ENVCMD $H5DUMP_BIN -pH $outfile - ) >$actual2 2>$actual2_err - RET=$? - cat $actual2_err >> $actual2 + ) >$actual2 2>$actual2_err + RET=$? + cat $actual2_err >> $actual2 - if cmp -s $expect2 $actual2; then - echo " PASSED" - else - echo "*FAILED*" + if cmp -s $expect2 $actual2; then + echo " PASSED" + else + echo "*FAILED*" echo " Expected result (*.ddl) differs from actual result (*.out)" nerrors="`expr $nerrors + 1`" test yes = "$verbose" && diff -c $expect2 $actual2 |sed 's/^/ /' diff --git a/tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl b/tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl index d380201..b8e7e68 100644 --- a/tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl +++ b/tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/out-deflate_limit.h5repack_layout.h5" { +HDF5 "out-deflate_limit.h5repack_layout.h5" { GROUP "/" { DATASET "dset1" { DATATYPE H5T_STD_I32LE diff --git a/tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl b/tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl index a7ba967..7a3a01e 100644 --- a/tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl +++ b/tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl @@ -1,4 +1,4 @@ -HDF5 "testfiles/out-plugin_test.h5repack_layout.h5" { +HDF5 "out-plugin_test.h5repack_layout.h5" { GROUP "/" { DATASET "dset1" { DATATYPE H5T_STD_I32LE diff --git a/tools/misc/testh5mkgrp.sh.in b/tools/misc/testh5mkgrp.sh.in index 85205a8..190e824 100644 --- a/tools/misc/testh5mkgrp.sh.in +++ b/tools/misc/testh5mkgrp.sh.in @@ -49,7 +49,7 @@ SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles" # testfiles source dirs for tools SRC_H5MKGRP_TESTFILES="$SRC_TOOLS/misc/testfiles" -TESTDIR=./testfiles +TESTDIR=./testgrp test -d $TESTDIR || mkdir -p $TESTDIR ###################################################################### -- cgit v0.12