2015-09-21 22:19:09 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
|
|
|
|
docker build -t internetarchive/rethinkdb $script_dir || exit 1
|
|
|
|
|
2015-09-22 21:32:53 +00:00
|
|
|
uid=$(id -u)
|
|
|
|
user=$(id -un)
|
|
|
|
|
2015-09-21 22:19:09 +00:00
|
|
|
for python in python2.7 python3.4
|
|
|
|
do
|
2015-10-30 19:53:20 +00:00
|
|
|
docker run --rm -it --volume="$script_dir/..:/rethinkstuff" internetarchive/rethinkdb /sbin/my_init -- \
|
|
|
|
bash -x -c "adduser --gecos=$user --disabled-password --quiet --uid=$uid $user \
|
2015-11-06 23:40:03 +00:00
|
|
|
&& sudo PYTHONDONTWRITEBYTECODE=1 -u $user bash -x -c 'cd /rethinkstuff \
|
2015-10-06 00:57:15 +00:00
|
|
|
&& virtualenv -p $python /tmp/venv \
|
|
|
|
&& source /tmp/venv/bin/activate \
|
2015-11-06 23:40:03 +00:00
|
|
|
&& pip install pytest . \
|
|
|
|
&& py.test -v -s tests'"
|
2015-09-21 22:19:09 +00:00
|
|
|
done
|