1 Star 0 Fork 0

caoshiwei / ior

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
travis-test.sh 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
#!/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
C
1
https://gitee.com/mingganci/ior.git
git@gitee.com:mingganci/ior.git
mingganci
ior
ior
3.2

搜索帮助