summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-09-20 02:31:49 -0300
committerVictor Shyba <victor1984@riseup.net>2017-09-20 02:31:49 -0300
commit9f7797020b1277c733a2f496117df01105ddba31 (patch)
tree7cd91cd239ceafb1011c743cc3b8c06739def743
parent5c3bdc73f25139e662902f135e1e10c68cffec12 (diff)
[tests] add back sqlcipher checks to tox setup
-rwxr-xr-xscripts/testing/ensure-pysqlcipher-has-usleep.sh7
-rw-r--r--tox.ini16
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