summaryrefslogtreecommitdiff
path: root/scripts/testing/ensure-pysqlcipher-has-usleep.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/testing/ensure-pysqlcipher-has-usleep.sh')
-rwxr-xr-xscripts/testing/ensure-pysqlcipher-has-usleep.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/testing/ensure-pysqlcipher-has-usleep.sh b/scripts/testing/ensure-pysqlcipher-has-usleep.sh
new file mode 100755
index 00000000..d3d93d86
--- /dev/null
+++ b/scripts/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)