From e909ccfc401eb6a11f9b48f44b420723fb01cfbd Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Fri, 2 Oct 2015 00:22:49 +0000 Subject: [PATCH 01/10] more fiddling with travis/docker --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 201d9d6..b952cde 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,5 +11,5 @@ services: before_install: - docker build -t internetarchive/rethinkdb tests script: - - docker run --rm -i -t --volume="..:/rethinkstuff" internetarchive/rethinkdb /sbin/my_init -- bash -x -c "cd /rethinkstuff && virtualenv -p $python /tmp/venv && source /tmp/venv/bin/activate && pip install pytest . && py.test -v -s tests" + - docker run --rm -i -t internetarchive/rethinkdb /sbin/my_init -- bash -x -c "cd /rethinkstuff && /tmp/venv && source /tmp/venv/bin/activate && pip install pytest . && py.test -v -s tests" From 9257a31057b0220cc12e3d9282c196e7c6c2963e Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Fri, 2 Oct 2015 01:19:16 +0000 Subject: [PATCH 02/10] docker volume $TRAVIS_BUILD_DIR --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b952cde..2970d65 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,5 +11,5 @@ services: before_install: - docker build -t internetarchive/rethinkdb tests script: - - docker run --rm -i -t internetarchive/rethinkdb /sbin/my_init -- bash -x -c "cd /rethinkstuff && /tmp/venv && source /tmp/venv/bin/activate && pip install pytest . && py.test -v -s tests" + - docker run --rm -i -t --volume="$TRAVIS_BUILD_DIR:/rethinkstuff" internetarchive/rethinkdb /sbin/my_init -- bash -x -c "cd /rethinkstuff && /tmp/venv && source /tmp/venv/bin/activate && pip install pytest . && py.test -v -s tests" From 7e96d65f960b1d0dd4fe047e88ef212242b85120 Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Fri, 2 Oct 2015 01:28:29 +0000 Subject: [PATCH 03/10] ugh wait that long for travis to find this mistake --- .travis.yml | 2 +- tests/run-tests.sh | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2970d65..7757832 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,5 +11,5 @@ services: before_install: - docker build -t internetarchive/rethinkdb tests script: - - docker run --rm -i -t --volume="$TRAVIS_BUILD_DIR:/rethinkstuff" internetarchive/rethinkdb /sbin/my_init -- bash -x -c "cd /rethinkstuff && /tmp/venv && source /tmp/venv/bin/activate && pip install pytest . && py.test -v -s tests" + - docker run --rm -i -t --volume="$TRAVIS_BUILD_DIR:/rethinkstuff" internetarchive/rethinkdb /sbin/my_init -- bash -x -c "cd /rethinkstuff && virtualenv /tmp/venv && source /tmp/venv/bin/activate && pip install pytest . && py.test -v -s tests" diff --git a/tests/run-tests.sh b/tests/run-tests.sh index 3e482f8..4b5156e 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -9,12 +9,11 @@ user=$(id -un) for python in python2.7 python3.4 do - docker run --rm -i -t --volume="$script_dir/..:/rethinkstuff" internetarchive/rethinkdb /sbin/my_init -- \ - bash -x -c "adduser --gecos=$user --disabled-password --quiet --uid=$uid $user \ - && sudo -u $user bash -x -c 'cd /rethinkstuff \ + docker run --net=host --rm -i -t --volume="$script_dir/..:/rethinkstuff" internetarchive/rethinkdb /sbin/my_init -- \ + bash -x -c "cd /rethinkstuff \ && virtualenv -p $python /tmp/venv \ && source /tmp/venv/bin/activate \ && pip install pytest . \ - && py.test -v -s tests'" + && py.test -v -s tests" done From ef4b360d6cb80cf9b304deb431a9c73cb179de41 Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Fri, 2 Oct 2015 01:39:36 +0000 Subject: [PATCH 04/10] duh, docker container doesn't inherit python --- .travis.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7757832..ebc28ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,7 @@ sudo: required language: python -python: - - 2.7 - - 3.4 - - 3.5 - - nightly - - pypy services: - docker -before_install: - - docker build -t internetarchive/rethinkdb tests script: - - docker run --rm -i -t --volume="$TRAVIS_BUILD_DIR:/rethinkstuff" internetarchive/rethinkdb /sbin/my_init -- bash -x -c "cd /rethinkstuff && virtualenv /tmp/venv && source /tmp/venv/bin/activate && pip install pytest . && py.test -v -s tests" + - ./tests/run-tests.sh From 314462a83c18936350eb2f365b5d70f8ff5c36c7 Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Thu, 1 Oct 2015 19:05:10 -0700 Subject: [PATCH 05/10] remove -i and -t flags so travis won't hang? --- tests/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run-tests.sh b/tests/run-tests.sh index 4b5156e..ffc3fdd 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -9,7 +9,7 @@ user=$(id -un) for python in python2.7 python3.4 do - docker run --net=host --rm -i -t --volume="$script_dir/..:/rethinkstuff" internetarchive/rethinkdb /sbin/my_init -- \ + docker run --net=host --rm --volume="$script_dir/..:/rethinkstuff" internetarchive/rethinkdb /sbin/my_init -- \ bash -x -c "cd /rethinkstuff \ && virtualenv -p $python /tmp/venv \ && source /tmp/venv/bin/activate \ From e1474133b638e1f442b812ee794a79b6038f6a69 Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Fri, 2 Oct 2015 16:55:11 +0000 Subject: [PATCH 06/10] does it still hang if we don't really run anything inside docker? --- tests/run-tests.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/run-tests.sh b/tests/run-tests.sh index ffc3fdd..d458045 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -9,11 +9,12 @@ user=$(id -un) for python in python2.7 python3.4 do - docker run --net=host --rm --volume="$script_dir/..:/rethinkstuff" internetarchive/rethinkdb /sbin/my_init -- \ - bash -x -c "cd /rethinkstuff \ - && virtualenv -p $python /tmp/venv \ - && source /tmp/venv/bin/activate \ - && pip install pytest . \ - && py.test -v -s tests" + docker run --rm --volume="$script_dir/..:/rethinkstuff" internetarchive/rethinkdb /sbin/my_init -- \ + true + # bash -x -c "cd /rethinkstuff \ + # && virtualenv -p $python /tmp/venv \ + # && source /tmp/venv/bin/activate \ + # && pip install pytest . \ + # && py.test -v -s tests" done From c124507c15c53dc925af5166f1f4fac3d6ab16c3 Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Fri, 2 Oct 2015 17:11:00 +0000 Subject: [PATCH 07/10] does it still hang if we pipe in /dev/null to stdin? --- tests/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run-tests.sh b/tests/run-tests.sh index d458045..bec3582 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -10,7 +10,7 @@ user=$(id -un) for python in python2.7 python3.4 do docker run --rm --volume="$script_dir/..:/rethinkstuff" internetarchive/rethinkdb /sbin/my_init -- \ - true + true < /dev/null # bash -x -c "cd /rethinkstuff \ # && virtualenv -p $python /tmp/venv \ # && source /tmp/venv/bin/activate \ From f4fb551d95dca5a13a9c3559d1221ea6f3fbd841 Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Fri, 2 Oct 2015 17:46:08 +0000 Subject: [PATCH 08/10] does it still hang with docker run -i? --- tests/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run-tests.sh b/tests/run-tests.sh index bec3582..3a1ecdb 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -9,7 +9,7 @@ user=$(id -un) for python in python2.7 python3.4 do - docker run --rm --volume="$script_dir/..:/rethinkstuff" internetarchive/rethinkdb /sbin/my_init -- \ + docker run -i --rm --volume="$script_dir/..:/rethinkstuff" internetarchive/rethinkdb /sbin/my_init -- \ true < /dev/null # bash -x -c "cd /rethinkstuff \ # && virtualenv -p $python /tmp/venv \ From e76403344366450edd42a199ca62a016ece89cdf Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Fri, 2 Oct 2015 22:20:53 +0000 Subject: [PATCH 09/10] ok forget run-tests.sh, just run rethinkdb in docker container, tests outside --- .travis.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index ebc28ab..32179ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,17 @@ -sudo: required language: python +python: + - 3.5 + - 3.4 + - 2.7 + - nightly + - pypy + - pypy3 services: - docker +before_install: + - docker run -d --publish=28015:28015 rethinkdb +install: + - pip install . pytest script: - - ./tests/run-tests.sh + - py.test -v -s tests From 15b796c49956683789029e465671a4157a0732d5 Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Fri, 2 Oct 2015 22:28:08 +0000 Subject: [PATCH 10/10] try to work around iptables error --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 32179ee..3da33e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ python: services: - docker before_install: + - sudo service docker restart ; sleep 10 # https://github.com/travis-ci/travis-ci/issues/4778 - docker run -d --publish=28015:28015 rethinkdb install: - pip install . pytest