fix various issues related to release packages

- travis now tests the packaged source to detect missing source/headers
- basic tests are less sensitive to the directory from where they are run
- fixed some missing files from the `make dist` manifest
- updated the format of NEWS to work with `make dist`
master
Glenn K. Lockwood 2018-09-21 18:35:48 -04:00
parent 87091dde4c
commit e448ff266d
9 changed files with 100 additions and 26 deletions

1
.gitignore vendored
View File

@ -9,6 +9,7 @@ config/config.sub
config/depcomp
config/install-sh
config/missing
config/test-driver
configure
contrib/.deps/
contrib/Makefile

View File

@ -28,11 +28,4 @@ install:
# aiori-S3.c to achive this.
# GPFS
# NOTE: Think GPFS need a license and is therefore not testable with travis.
before_script: ./bootstrap
script: mkdir build && cd build && ../configure --with-hdf5 && make && cd .. && ./testing/basic-tests.sh
# notifications:
# email:
# on_success: change # default: change
# on_failure: always # default: always
script: ./travis-build.sh && CONFIGURE_OPTS="--with-hdf5" ./travis-test.sh

View File

@ -1,5 +1,13 @@
MAKEFLAGS = --no-print-directory
SUBDIRS = src doc contrib
EXTRA_DIST = META COPYRIGHT README.md ChangeLog
EXTRA_DIST = META COPYRIGHT README.md NEWS testing
# ACLOCAL_AMFLAGS needed for autoconf < 2.69
ACLOCAL_AMFLAGS = -I config
# The basic-tests.sh scripts run MPI versions of IOR/mdtest and are therefore
# too complicated to run in the context of distclean. As such we reserve
# `make dist` and `make test` for simple test binaries that do not require any
# special environment.
#TESTS = testing/basic-tests.sh
#DISTCLEANFILES = -r test test_out

7
NEWS
View File

@ -1,9 +1,4 @@
IOR NEWS
================================================================================
Last updated 2018-08
Version 3.2
Version 3.2.0
--------------------------------------------------------------------------------
New major features:

View File

@ -5,7 +5,7 @@ if USE_CAPS
bin_PROGRAMS += IOR MDTEST
endif
noinst_HEADERS = ior.h utilities.h parse_options.h aiori.h iordef.h ior-internal.h option.h
noinst_HEADERS = ior.h utilities.h parse_options.h aiori.h iordef.h ior-internal.h option.h mdtest.h
lib_LIBRARIES = libaiori.a
libaiori_a_SOURCES = ior.c mdtest.c utilities.c parse_options.c ior-output.c option.c

View File

@ -6,7 +6,7 @@
# You can override the defaults by setting the variables before invoking the script, or simply set them here...
# Example: export IOR_EXTRA="-v -v -v"
ROOT=${0%/*}
ROOT="$(dirname ${BASH_SOURCE[0]})"
source $ROOT/test-lib.sh

View File

@ -1,18 +1,21 @@
# Test script for basic IOR functionality testing various patterns
# It is kept as simple as possible and outputs the parameters used such that any test can be rerun easily.
# It is kept as simple as possible and outputs the parameters used such that any
# test can be rerun easily.
# You can override the defaults by setting the variables before invoking the script, or simply set them here...
# You can override the defaults by setting the variables before invoking the
# script, or simply set them here...
# Example: export IOR_EXTRA="-v -v -v"
IOR_MPIRUN=${IOR_MPIRUN:-mpiexec -np}
IOR_BIN_DIR=${IOR_BIN_DIR:-./build/src}
IOR_OUT=${IOR_OUT:-./build/test}
IOR_BIN_DIR=${IOR_BIN_DIR:-./src}
IOR_OUT=${IOR_OUT:-./test_logs}
IOR_TMP=${IOR_TMP:-/dev/shm}
IOR_EXTRA=${IOR_EXTRA:-} # Add global options like verbosity
MDTEST_EXTRA=${MDTEST_EXTRA:-}
################################################################################
mkdir -p ${IOR_OUT}
mkdir -p /dev/shm/mdest
mkdir -p ${IOR_TMP}/mdest
## Sanity check
@ -36,8 +39,8 @@ I=0
function IOR(){
RANKS=$1
shift
WHAT="${IOR_MPIRUN} $RANKS ${IOR_BIN_DIR}/ior ${@} ${IOR_EXTRA} -o /dev/shm/ior"
$WHAT 1>${IOR_OUT}/$I 2>&1
WHAT="${IOR_MPIRUN} $RANKS ${IOR_BIN_DIR}/ior ${@} ${IOR_EXTRA} -o ${IOR_TMP}/ior"
$WHAT 1>"${IOR_OUT}/test_out.$I" 2>&1
if [[ $? != 0 ]]; then
echo -n "ERR"
ERRORS=$(($ERRORS + 1))
@ -51,8 +54,8 @@ function IOR(){
function MDTEST(){
RANKS=$1
shift
WHAT="${IOR_MPIRUN} $RANKS ${IOR_BIN_DIR}/mdtest ${@} ${MDTEST_EXTRA} -d /dev/shm/mdest"
$WHAT 1>${IOR_OUT}/$I 2>&1
WHAT="${IOR_MPIRUN} $RANKS ${IOR_BIN_DIR}/mdtest ${@} ${MDTEST_EXTRA} -d ${IOR_TMP}/mdest"
$WHAT 1>"${IOR_OUT}/test_out.$I" 2>&1
if [[ $? != 0 ]]; then
echo -n "ERR"
ERRORS=$(($ERRORS + 1))

26
travis-build.sh Executable file
View File

@ -0,0 +1,26 @@
#!/usr/bin/env bash
#
# Build the IOR source package. Returns the path to the built artifact.
#
BASE_DIR="$(cd "${0%/*}" && pwd)"
if [ -z "$BASE_DIR" -o ! -d "$BASE_DIR" ]; then
echo "Cannot determine BASE_DIR (${BASE_DIR})" >&2
exit 2
fi
BUILD_DIR="${BASE_DIR}/build"
PACKAGE="$(awk '/^Package/ {print $2}' $BASE_DIR/META)"
VERSION="$(awk '/^Version/ {print $2}' $BASE_DIR/META)"
DIST_TGZ="${PACKAGE}-${VERSION}.tar.gz"
# Build the distribution
set -e
./bootstrap
test -d "$BUILD_DIR" && rm -rf "$BUILD_DIR"
mkdir -p "$BUILD_DIR"
cd "$BUILD_DIR"
$BASE_DIR/configure
set +e
make dist && mv -v "${BUILD_DIR}/${DIST_TGZ}" "${BASE_DIR}/${DIST_TGZ}"

48
travis-test.sh Executable file
View File

@ -0,0 +1,48 @@
#!/usr/bin/env bash
#
# Test the IOR source package. This is a complicated alternative to
# the `make distcheck` option.
#
# These options will be passed directly to the autoconf configure script
CONFIGURE_OPTS="${CONFIGURE_OPTS:-""}"
BASE_DIR="$(cd "${0%/*}" && pwd)"
if [ -z "$BASE_DIR" -o ! -d "$BASE_DIR" ]; then
echo "Cannot determine BASE_DIR (${BASE_DIR})" >&2
exit 2
fi
PACKAGE="$(awk '/^Package/ {print $2}' $BASE_DIR/META)"
VERSION="$(awk '/^Version/ {print $2}' $BASE_DIR/META)"
DIST_TGZ="${BASE_DIR}/${PACKAGE}-${VERSION}.tar.gz"
TEST_DIR="${BASE_DIR}/test"
INSTALL_DIR="${TEST_DIR}/_inst"
if [ -z "$DIST_TGZ" -o ! -f "$DIST_TGZ" ]; then
echo "Cannot find DIST_TGZ ($DIST_TGZ)" >&2
exit 1
fi
test -d "$TEST_DIR" && rm -rf "$TEST_DIR"
mkdir -p "$TEST_DIR"
tar -C "$TEST_DIR" -zxf "${DIST_TGZ}"
# Configure, make, and install from the source distribution
set -e
cd "$TEST_DIR/${PACKAGE}-${VERSION}"
./configure $CONFIGURE_OPTS "--prefix=$INSTALL_DIR"
make install
set +e
# Run the MPI tests
export IOR_BIN_DIR="${INSTALL_DIR}/bin"
export IOR_OUT="${TEST_DIR}/test_logs"
export IOR_TMP="$(mktemp -d)"
source "${TEST_DIR}/${PACKAGE}-${VERSION}/testing/basic-tests.sh"
# Clean up residual temporary directories (if this isn't running as root)
if [ -d "$IOR_TMP" -a "$(id -u)" -ne 0 -a ! -z "$IOR_TMP" ]; then
rm -rvf "$IOR_TMP"
fi