Revision 3108dede54500f8601b7ee5a6ed3d723b8b3e7e3 authored by Duncan Brown on 05 April 2017, 17:34:49 UTC, committed by Steven Reyes on 05 April 2017, 17:34:49 UTC
1 parent c08583e
run_travis.sh
#!/bin/bash
echo -e "\\n>> [`date`] Starting PyCBC test suite"
LOG_FILE=$(mktemp -t pycbc-test-log.XXXXXXXXXX)
BUILD=${HOME}/build
BUILDDIRNAME="pycbc-build"
PYCBC="$BUILD/$BUILDDIRNAME"
PYTHON_PREFIX="$PYCBC"
ENVIRONMENT="$PYCBC/environment"
PREFIX="$ENVIRONMENT"
PATH="$PREFIX/bin:$PYTHON_PREFIX/bin:$PATH"
export LD_LIBRARY_PATH="$PREFIX/lib:$PREFIX/bin:$PYTHON_PREFIX/lib:/usr/local/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PYTHON_PREFIX/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
source ${BUILD}/pycbc-build/environment/etc/lalsuite-user-env.sh
source ${BUILD}/pycbc-build/environment/bin/activate
export LAL_DATA_PATH=$HOME/build/pycbc-sources/test
RESULT=0
# Using python setup.py test has two issues:
# Some tests fail for reasons not necessarily related to PyCBC
# Setup.py seems to returns 0 even when tests fail
# So we rather run specific tests manually
for prog in `find test -name '*.py' -print | egrep -v '(autochisq|bankveto|fft|schemes|long|lalsim|test_waveform)'`
do
echo -e ">> [`date`] running unit test for $prog"
python $prog &> $LOG_FILE
if test $? -ne 0 ; then
RESULT=1
echo -e " FAILED!"
echo -e "---------------------------------------------------------"
cat $LOG_FILE
echo -e "---------------------------------------------------------"
else
echo -e " Pass."
fi
done
# check that all executables that do not require
# special environments can return a help message
for prog in `find ${PATH//:/ } -maxdepth 1 -name 'pycbc*' -print 2>/dev/null | egrep -v '(pycbc_live|pycbc_live_nagios_monitor|pycbc_make_grb_summary_page|pycbc_make_offline_grb_workflow|pycbc_mvsc_get_features|pycbc_upload_xml_to_gracedb)'`
do
echo -e ">> [`date`] running $prog --help"
$prog --help &> $LOG_FILE
if test $? -ne 0 ; then
RESULT=1
echo -e " FAILED!"
echo -e "---------------------------------------------------------"
cat $LOG_FILE
echo -e "---------------------------------------------------------"
else
echo -e " Pass."
fi
done
echo -e "\\n>> [`date`] Building documentation"
python setup.py build_gh_pages &> $LOG_FILE
if test $? -ne 0 ; then
echo -e " FAILED!"
echo -e "---------------------------------------------------------"
cat $LOG_FILE
echo -e "---------------------------------------------------------"
RESULT=1
fi
exit ${RESULT}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...