diff options
-rwxr-xr-x | testing/ensure-pysqlcipher-has-usleep.sh | 13 | ||||
-rw-r--r-- | testing/tox.ini | 8 |
2 files changed, 16 insertions, 5 deletions
diff --git a/testing/ensure-pysqlcipher-has-usleep.sh b/testing/ensure-pysqlcipher-has-usleep.sh new file mode 100755 index 00000000..d3d93d86 --- /dev/null +++ b/testing/ensure-pysqlcipher-has-usleep.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# make sure that the current installed version of pysqlcipher has the +# HAVE_USLEEP flag set so we don't have problems with concurrent db access. + +set -e + +install_bundled_pysqlcipher() { + pip uninstall -y pysqlcipher + pip install --install-option="--bundled" pysqlcipher +} + +./check-pysqlcipher.py || (install_bundled_pysqlcipher && ./check-pysqlcipher.py) diff --git a/testing/tox.ini b/testing/tox.ini index aba69cf6..9aaa1ae3 100644 --- a/testing/tox.ini +++ b/testing/tox.ini @@ -73,11 +73,9 @@ deps = elasticsearch certifi commands = -# use a bundled version of pysqlcipher to ensure HAVE_USLEEP is set and we -# don't have problems with concurrent db access. - pip install -I --install-option="--bundled" pysqlcipher - ./check-pysqlcipher.py -# and only then run benchmark +# we must make sure that installed pysqlcipher was built with the HAVE_USLEEP +# flag, or we might have problems with concurrent db access. + ./ensure-pysqlcipher-has-usleep.sh py.test --benchmark-only {posargs} passenv = HOST_HOSTNAME |