Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testsuite: improve test reliability and prepare for asan testing #1733

Merged
merged 9 commits into from Oct 15, 2018

test: check for output sync support, add to centos

The devtoolset-7-make package has been added to our centos-7 image so we
can count on output sync for travis, and the travis_run script checks
for a recent make, if it's not available it tries to load the SCL for
the devtoolset, if that fails it just goes ahead without sync.
  • Loading branch information...
trws committed Oct 12, 2018
commit bd711e1fba71281a22115f08b4c8269f7442e1b8
@@ -3,8 +3,11 @@ FROM centos:7
LABEL maintainer="Tom Scogland <scogland1@llnl.gov>"

# add EPEL so we don't have to build everything by hand
# add scl and devtoolset-7 so we can use next-rhel tools, just make 4 for now
# so we can avoid make sync issues on travis
RUN yum -y update \
&& yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
&& yum -y install centos-release-scl-rh \
&& yum -y update \
&& yum -y install \
which \
@@ -50,6 +53,7 @@ RUN yum -y update \
man-db \
aspell \
aspell-en \
devtoolset-7-make \
&& yum clean all

# The cmake from yum is incredibly ancient, download a less ancient one
Copy path View file
@@ -20,12 +20,26 @@
# CC, CXX, LDFLAGS, CFLAGS, etc.
#

# if make is old, and scl is here, and devtoolset is available and not turned
# on, re-exec ourself with it active to get a newer make
if make --version | grep 'GNU Make 4' 2>&1 > /dev/null ; then
MAKE="make --output-sync=target"
else
MAKE="make" #use this if all else fails
if test "X$X_SCLS" = "X" ; then
if scl -l | grep devtoolset-7 2>&1 >/dev/null ; then
echo bash "$0" "$@" | scl enable devtoolset-7 -
exit
fi
fi
fi

# source travis_fold and travis_time functions:
. src/test/travis-lib.sh

ARGS="$@"
JOBS=${JOBS:-2}
MAKECMDS="make --output-sync=line -j ${JOBS} ${DISTCHECK:+dist}check"
MAKECMDS="${MAKE} -j ${JOBS} ${DISTCHECK:+dist}check"

# Add non-standard path for libfaketime to LD_LIBRARY_PATH:
export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu/faketime"
@@ -61,16 +75,16 @@ sudo sh -c "mkdir -p /usr/include/flux \
# We can't use distcheck here, it doesn't play well with coverage testing:
if test "$COVERAGE" = "t"; then
ARGS="$ARGS --enable-code-coverage"
MAKECMDS="make -j $JOBS && \
make -j $JOBS check-code-coverage && \
MAKECMDS="${MAKE} -j $JOBS && \
${MAKE} -j $JOBS check-code-coverage && \
lcov -l flux*-coverage.info"

# Use make install for T_INSTALL:
elif test "$TEST_INSTALL" = "t"; then
ARGS="$ARGS --prefix=/usr --sysconfdir=/etc"
MAKECMDS="make -j $JOBS && sudo make install && \
MAKECMDS="${MAKE} -j $JOBS && sudo make install && \
/usr/bin/flux keygen --force && \
FLUX_TEST_INSTALLED_PATH=/usr/bin make -j $JOBS check"
FLUX_TEST_INSTALLED_PATH=/usr/bin ${MAKE} -j $JOBS check"
fi

# Travis has limited resources, even though number of processors might
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.