2014-12-10 06:36:27 +01:00
|
|
|
#!/bin/bash
|
2017-04-30 14:49:46 +02:00
|
|
|
. tests/shlib/common.sh
|
2015-08-22 16:18:35 +02:00
|
|
|
|
|
|
|
enter_suite root
|
2014-12-10 06:36:27 +01:00
|
|
|
|
2015-02-21 00:00:13 +01:00
|
|
|
if test "$TRAVIS" = true ; then
|
2015-05-10 18:40:47 +02:00
|
|
|
export PATH="$HOME/opt/fish/bin:${PATH}"
|
2015-05-10 20:16:23 +02:00
|
|
|
export PATH="$PWD/tests/bot-ci/deps/rc:$PATH"
|
2015-01-02 11:40:04 +01:00
|
|
|
|
2015-02-21 00:00:13 +01:00
|
|
|
if test "$PYTHON_IMPLEMENTATION" = "CPython" ; then
|
2015-05-10 18:40:47 +02:00
|
|
|
export PATH="$HOME/opt/zsh-${PYTHON_MM}${USE_UCS2_PYTHON:+-ucs2}/bin:${PATH}"
|
2015-02-21 00:00:13 +01:00
|
|
|
fi
|
2015-01-02 01:43:57 +01:00
|
|
|
|
2015-02-21 00:00:13 +01:00
|
|
|
if test -n "$USE_UCS2_PYTHON" ; then
|
2015-05-10 18:40:47 +02:00
|
|
|
export LD_LIBRARY_PATH="$HOME/opt/cpython-ucs2-$UCS2_PYTHON_VARIANT/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
|
2015-02-21 00:00:13 +01:00
|
|
|
set +e
|
|
|
|
. virtualenvwrapper.sh
|
|
|
|
workon cpython-ucs2-$UCS2_PYTHON_VARIANT
|
|
|
|
set -e
|
2017-05-01 00:45:07 +02:00
|
|
|
else
|
|
|
|
LIBRARY_PATH="$(ldd "$(which python)" | grep libpython | sed 's/^.* => //;s/ .*$//')"
|
|
|
|
LIBRARY_DIR="$(dirname "${LIBRARY_PATH}")"
|
|
|
|
export LD_LIBRARY_PATH="$LIBRARY_DIR${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
|
2015-02-21 00:00:13 +01:00
|
|
|
fi
|
2014-12-10 06:36:27 +01:00
|
|
|
fi
|
|
|
|
|
2014-08-29 20:22:39 +02:00
|
|
|
export PYTHON="${PYTHON:=python}"
|
2015-01-02 22:04:11 +01:00
|
|
|
export PYTHONPATH="${PYTHONPATH}${PYTHONPATH:+:}`realpath .`"
|
2017-04-30 21:36:00 +02:00
|
|
|
for script in "$ROOT"/tests/test_*/test.sh ; do
|
2015-08-22 16:18:35 +02:00
|
|
|
test_name="${script##*/run_}"
|
2014-08-29 20:22:39 +02:00
|
|
|
if ! sh $script ; then
|
2015-08-22 16:18:35 +02:00
|
|
|
fail "${test_name%_tests.sh}" F "Failed $script"
|
2013-03-09 13:16:00 +01:00
|
|
|
fi
|
2013-03-17 10:55:31 +01:00
|
|
|
done
|
2015-08-22 16:18:35 +02:00
|
|
|
|
|
|
|
if test -e tests/failures ; then
|
|
|
|
echo "Some tests failed. Summary:"
|
|
|
|
cat tests/failures
|
|
|
|
rm tests/failures
|
|
|
|
fi
|
|
|
|
|
|
|
|
exit_suite
|