Skip to content

Commit e448ff2

Browse files
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`
1 parent 87091dd commit e448ff2

9 files changed

+100
-26
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ config/config.sub
99
config/depcomp
1010
config/install-sh
1111
config/missing
12+
config/test-driver
1213
configure
1314
contrib/.deps/
1415
contrib/Makefile

.travis.yml

+1-8
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,4 @@ install:
2828
# aiori-S3.c to achive this.
2929
# GPFS
3030
# NOTE: Think GPFS need a license and is therefore not testable with travis.
31-
before_script: ./bootstrap
32-
script: mkdir build && cd build && ../configure --with-hdf5 && make && cd .. && ./testing/basic-tests.sh
33-
34-
35-
# notifications:
36-
# email:
37-
# on_success: change # default: change
38-
# on_failure: always # default: always
31+
script: ./travis-build.sh && CONFIGURE_OPTS="--with-hdf5" ./travis-test.sh

Makefile.am

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

NEWS

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
IOR NEWS
2-
================================================================================
3-
4-
Last updated 2018-08
5-
6-
Version 3.2
1+
Version 3.2.0
72
--------------------------------------------------------------------------------
83

94
New major features:

src/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if USE_CAPS
55
bin_PROGRAMS += IOR MDTEST
66
endif
77

8-
noinst_HEADERS = ior.h utilities.h parse_options.h aiori.h iordef.h ior-internal.h option.h
8+
noinst_HEADERS = ior.h utilities.h parse_options.h aiori.h iordef.h ior-internal.h option.h mdtest.h
99

1010
lib_LIBRARIES = libaiori.a
1111
libaiori_a_SOURCES = ior.c mdtest.c utilities.c parse_options.c ior-output.c option.c

testing/basic-tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# You can override the defaults by setting the variables before invoking the script, or simply set them here...
77
# Example: export IOR_EXTRA="-v -v -v"
88

9-
ROOT=${0%/*}
9+
ROOT="$(dirname ${BASH_SOURCE[0]})"
1010

1111
source $ROOT/test-lib.sh
1212

testing/test-lib.sh

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
# Test script for basic IOR functionality testing various patterns
2-
# It is kept as simple as possible and outputs the parameters used such that any test can be rerun easily.
2+
# It is kept as simple as possible and outputs the parameters used such that any
3+
# test can be rerun easily.
34

4-
# You can override the defaults by setting the variables before invoking the script, or simply set them here...
5+
# You can override the defaults by setting the variables before invoking the
6+
# script, or simply set them here...
57
# Example: export IOR_EXTRA="-v -v -v"
68

79
IOR_MPIRUN=${IOR_MPIRUN:-mpiexec -np}
8-
IOR_BIN_DIR=${IOR_BIN_DIR:-./build/src}
9-
IOR_OUT=${IOR_OUT:-./build/test}
10+
IOR_BIN_DIR=${IOR_BIN_DIR:-./src}
11+
IOR_OUT=${IOR_OUT:-./test_logs}
12+
IOR_TMP=${IOR_TMP:-/dev/shm}
1013
IOR_EXTRA=${IOR_EXTRA:-} # Add global options like verbosity
1114
MDTEST_EXTRA=${MDTEST_EXTRA:-}
1215

1316
################################################################################
1417
mkdir -p ${IOR_OUT}
15-
mkdir -p /dev/shm/mdest
18+
mkdir -p ${IOR_TMP}/mdest
1619

1720
## Sanity check
1821

@@ -36,8 +39,8 @@ I=0
3639
function IOR(){
3740
RANKS=$1
3841
shift
39-
WHAT="${IOR_MPIRUN} $RANKS ${IOR_BIN_DIR}/ior ${@} ${IOR_EXTRA} -o /dev/shm/ior"
40-
$WHAT 1>${IOR_OUT}/$I 2>&1
42+
WHAT="${IOR_MPIRUN} $RANKS ${IOR_BIN_DIR}/ior ${@} ${IOR_EXTRA} -o ${IOR_TMP}/ior"
43+
$WHAT 1>"${IOR_OUT}/test_out.$I" 2>&1
4144
if [[ $? != 0 ]]; then
4245
echo -n "ERR"
4346
ERRORS=$(($ERRORS + 1))
@@ -51,8 +54,8 @@ function IOR(){
5154
function MDTEST(){
5255
RANKS=$1
5356
shift
54-
WHAT="${IOR_MPIRUN} $RANKS ${IOR_BIN_DIR}/mdtest ${@} ${MDTEST_EXTRA} -d /dev/shm/mdest"
55-
$WHAT 1>${IOR_OUT}/$I 2>&1
57+
WHAT="${IOR_MPIRUN} $RANKS ${IOR_BIN_DIR}/mdtest ${@} ${MDTEST_EXTRA} -d ${IOR_TMP}/mdest"
58+
$WHAT 1>"${IOR_OUT}/test_out.$I" 2>&1
5659
if [[ $? != 0 ]]; then
5760
echo -n "ERR"
5861
ERRORS=$(($ERRORS + 1))

travis-build.sh

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Build the IOR source package. Returns the path to the built artifact.
4+
#
5+
6+
BASE_DIR="$(cd "${0%/*}" && pwd)"
7+
if [ -z "$BASE_DIR" -o ! -d "$BASE_DIR" ]; then
8+
echo "Cannot determine BASE_DIR (${BASE_DIR})" >&2
9+
exit 2
10+
fi
11+
BUILD_DIR="${BASE_DIR}/build"
12+
13+
PACKAGE="$(awk '/^Package/ {print $2}' $BASE_DIR/META)"
14+
VERSION="$(awk '/^Version/ {print $2}' $BASE_DIR/META)"
15+
DIST_TGZ="${PACKAGE}-${VERSION}.tar.gz"
16+
17+
# Build the distribution
18+
set -e
19+
./bootstrap
20+
test -d "$BUILD_DIR" && rm -rf "$BUILD_DIR"
21+
mkdir -p "$BUILD_DIR"
22+
cd "$BUILD_DIR"
23+
$BASE_DIR/configure
24+
set +e
25+
26+
make dist && mv -v "${BUILD_DIR}/${DIST_TGZ}" "${BASE_DIR}/${DIST_TGZ}"

travis-test.sh

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Test the IOR source package. This is a complicated alternative to
4+
# the `make distcheck` option.
5+
#
6+
7+
# These options will be passed directly to the autoconf configure script
8+
CONFIGURE_OPTS="${CONFIGURE_OPTS:-""}"
9+
10+
BASE_DIR="$(cd "${0%/*}" && pwd)"
11+
if [ -z "$BASE_DIR" -o ! -d "$BASE_DIR" ]; then
12+
echo "Cannot determine BASE_DIR (${BASE_DIR})" >&2
13+
exit 2
14+
fi
15+
PACKAGE="$(awk '/^Package/ {print $2}' $BASE_DIR/META)"
16+
VERSION="$(awk '/^Version/ {print $2}' $BASE_DIR/META)"
17+
DIST_TGZ="${BASE_DIR}/${PACKAGE}-${VERSION}.tar.gz"
18+
19+
TEST_DIR="${BASE_DIR}/test"
20+
INSTALL_DIR="${TEST_DIR}/_inst"
21+
22+
if [ -z "$DIST_TGZ" -o ! -f "$DIST_TGZ" ]; then
23+
echo "Cannot find DIST_TGZ ($DIST_TGZ)" >&2
24+
exit 1
25+
fi
26+
27+
test -d "$TEST_DIR" && rm -rf "$TEST_DIR"
28+
mkdir -p "$TEST_DIR"
29+
30+
tar -C "$TEST_DIR" -zxf "${DIST_TGZ}"
31+
32+
# Configure, make, and install from the source distribution
33+
set -e
34+
cd "$TEST_DIR/${PACKAGE}-${VERSION}"
35+
./configure $CONFIGURE_OPTS "--prefix=$INSTALL_DIR"
36+
make install
37+
set +e
38+
39+
# Run the MPI tests
40+
export IOR_BIN_DIR="${INSTALL_DIR}/bin"
41+
export IOR_OUT="${TEST_DIR}/test_logs"
42+
export IOR_TMP="$(mktemp -d)"
43+
source "${TEST_DIR}/${PACKAGE}-${VERSION}/testing/basic-tests.sh"
44+
45+
# Clean up residual temporary directories (if this isn't running as root)
46+
if [ -d "$IOR_TMP" -a "$(id -u)" -ne 0 -a ! -z "$IOR_TMP" ]; then
47+
rm -rvf "$IOR_TMP"
48+
fi

0 commit comments

Comments
 (0)