2015-09-21 22:19:09 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2015-11-17 20:08:18 +00:00
|
|
|
set -e
|
2015-09-21 22:19:09 +00:00
|
|
|
|
2015-11-17 20:08:18 +00:00
|
|
|
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
2015-09-21 22:19:09 +00:00
|
|
|
|
2015-11-17 20:08:18 +00:00
|
|
|
docker build -t internetarchive/rethinkdb $script_dir
|
2015-09-22 21:32:53 +00:00
|
|
|
|
2017-02-21 16:30:29 -08:00
|
|
|
for python in python2.7 python3
|
2015-09-21 22:19:09 +00:00
|
|
|
do
|
2017-02-28 16:23:59 -08:00
|
|
|
docker run --rm -it --volume="$script_dir/..:/doublethink" internetarchive/rethinkdb /sbin/my_init -- \
|
|
|
|
bash -x -c "cd /tmp && git clone /doublethink \
|
|
|
|
&& cd /tmp/doublethink \
|
2017-10-03 13:56:52 -07:00
|
|
|
&& (cd /doublethink && git diff HEAD) | patch -p1 \
|
2015-11-17 20:08:18 +00:00
|
|
|
&& virtualenv -p $python /tmp/venv \
|
|
|
|
&& source /tmp/venv/bin/activate \
|
|
|
|
&& pip install pytest . \
|
2017-05-17 12:13:10 -07:00
|
|
|
&& py.test -v tests"
|
2015-09-21 22:19:09 +00:00
|
|
|
done
|