From 7ec06503b9d39881f15a7cf246d6eae0355802a0 Mon Sep 17 00:00:00 2001 From: John Eskew Date: Tue, 19 Dec 2017 13:59:48 -0500 Subject: [PATCH] Install recent version of sqlite/pysqlite to fix crashes in tests. --- scripts/upgrade_pysqlite.sh | 14 ++++++++++++++ tox.ini | 9 ++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100755 scripts/upgrade_pysqlite.sh diff --git a/scripts/upgrade_pysqlite.sh b/scripts/upgrade_pysqlite.sh new file mode 100755 index 0000000000..5a9fed0d93 --- /dev/null +++ b/scripts/upgrade_pysqlite.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Upgrade the version of pysqlite/sqlite to avoid crashes during testing. +# Ideally, this code would just install a pre-built wheel - change it to this +# once edX has its own artifact server. +pip uninstall -y pysqlite +rm -rf tmp_pysqlite_upgrade && mkdir -p tmp_pysqlite_upgrade && cd tmp_pysqlite_upgrade +curl -o 2.8.3.tar.gz https://codeload.github.com/ghaering/pysqlite/tar.gz/2.8.3 +curl -o sqlite-autoconf-3140100.tar.gz https://www.sqlite.org/2016/sqlite-autoconf-3140100.tar.gz +tar -xzvf sqlite-autoconf-3140100.tar.gz +tar -xzvf 2.8.3.tar.gz +cp -av sqlite-autoconf-3140100/. pysqlite-2.8.3/ +cd ./pysqlite-2.8.3 && python setup.py build_static install +cd ../.. && rm -rf tmp_pysqlite_upgrade diff --git a/tox.ini b/tox.ini index 5cc46de6be..4efcc34742 100644 --- a/tox.ini +++ b/tox.ini @@ -52,13 +52,20 @@ deps = -rrequirements/edx/local.txt -rrequirements/edx/base.txt -rrequirements/edx/development.txt - # There's 1-2 tests which call a paver command... -rrequirements/edx/testing.txt -rrequirements/edx/post.txt -rrequirements/edx/edx-private.txt -rrequirements/edx-sandbox/base.txt -rrequirements/edx-sandbox/local.txt -rrequirements/edx-sandbox/post.txt +whitelist_externals = + /bin/bash + /usr/bin/curl + /bin/tar commands = + # There's 1-2 tests which call a paver command... pip install -rrequirements/edx/paver.txt + # Upgrade sqlite to fix crashes during testing. + bash scripts/upgrade_pysqlite.sh + # Now perform testing. {posargs}