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

Check that timeout package is installed before running pytests #2158

Merged
merged 1 commit into from
Sep 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions testsuite/do_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ if test ! "${REPORTDIR}"; then
fi

if test "${PYTHON}"; then
PYTEST_VERSION="$(${PYTHON} -m pytest --version --numprocesses=auto 2>&1)" || {
TIME_LIMIT=120 # seconds, for each of the Python tests
PYTEST_VERSION="$(${PYTHON} -m pytest --version --timeout ${TIME_LIMIT} --numprocesses=auto 2>&1)" || {
echo "Error: PyNEST testing requested, but 'pytest' cannot be run."
echo " Testing also requires the 'pytest-xdist' extension."
echo " Testing also requires the 'pytest-xdist' and 'pytest-timeout' extensions."
exit 1
}
PYTEST_VERSION="$(echo "${PYTEST_VERSION}" | cut -d' ' -f2)"
Expand Down Expand Up @@ -128,8 +129,6 @@ TEST_OUTFILE="${REPORTDIR}/output.log"
TEST_RETFILE="${REPORTDIR}/output.ret"
TEST_RUNFILE="${REPORTDIR}/runtest.sh"

TIME_LIMIT=120 # seconds, for each of the Python tests

NEST="nest_serial"

HAVE_MPI="$(sli -c 'statusdict/have_mpi :: =only')"
Expand Down