From 9f7797020b1277c733a2f496117df01105ddba31 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 20 Sep 2017 02:31:49 -0300 Subject: [tests] add back sqlcipher checks to tox setup --- scripts/testing/ensure-pysqlcipher-has-usleep.sh | 7 +++++-- tox.ini | 16 ++++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/scripts/testing/ensure-pysqlcipher-has-usleep.sh b/scripts/testing/ensure-pysqlcipher-has-usleep.sh index d3d93d86..d1148aa0 100755 --- a/scripts/testing/ensure-pysqlcipher-has-usleep.sh +++ b/scripts/testing/ensure-pysqlcipher-has-usleep.sh @@ -9,5 +9,8 @@ install_bundled_pysqlcipher() { pip uninstall -y pysqlcipher pip install --install-option="--bundled" pysqlcipher } - -./check-pysqlcipher.py || (install_bundled_pysqlcipher && ./check-pysqlcipher.py) +check_pysqlcipher() { + SCRIPTPATH=$( cd $(dirname $0) ; pwd -P ) + $SCRIPTPATH/check-pysqlcipher.py +} +check_pysqlcipher || (install_bundled_pysqlcipher && check_pysqlcipher) diff --git a/tox.ini b/tox.ini index 3fa4ed54..46aed54b 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ skipsdist = True [testenv] basepython = python2.7 -commands = +commands = {env:CHECK_SQLCIPHER} py.test -x \ --cov-report=html \ --cov-report=term \ @@ -37,6 +37,7 @@ setenv = HOME=/tmp TERM=xterm XDG_CACHE_HOME=./.cache/ + CHECK_SQLCIPHER={toxinidir}/scripts/testing/ensure-pysqlcipher-has-usleep.sh install_command = pip install {opts} {packages} [testenv:py34] @@ -84,24 +85,27 @@ commands = [testenv:benchmark-time-cpu] usedevelop = True deps = {[testenv]deps} -commands = py.test --subdir=benchmarks {posargs} +commands = {env:CHECK_SQLCIPHER} + py.test --subdir=benchmarks {posargs} passenv = HOST_HOSTNAME [testenv:benchmark-memory] usedevelop = True deps = {[testenv]deps} -commands = py.test --subdir=benchmarks --watch-memory {posargs} +commands = {env:CHECK_SQLCIPHER} + py.test --subdir=benchmarks --watch-memory {posargs} passenv = HOST_HOSTNAME [testenv:responsiveness] usedevelop = True deps = {[testenv]deps} -commands = py.test --subdir=responsiveness {posargs} +commands = {env:CHECK_SQLCIPHER} + py.test --subdir=responsiveness {posargs} passenv = HOST_HOSTNAME [testenv:parallel] deps = {[testenv]deps} pytest-xdist -install_command = pip install {opts} {packages} -commands = py.test {posargs} -n 4 +commands = {env:CHECK_SQLCIPHER} + py.test {posargs} -n 4 -- cgit v1.2.3