Cope with changes in docker-py structure.

Tests are now in a different directory,
and get sharded by module rather than individually.
This commit is contained in:
Bryan Boreham committed 2015-11-13 11:08:57 +00:00
1 parent af3fc82b77
commit 804e6ba586
1 file changed
+3 -3
+3 -3
View File
@@ -13,14 +13,14 @@ docker_py_test() {
docker_on $HOST1 pull joffrey/docker-py >/dev/null
CANDIDATES=$(docker_on $HOST1 run \
joffrey/docker-py \
py.test --collect-only tests/integration_test.py \
| sed -En "s/\s*<UnitTestCase '([[:alpha:]]+)'>/\1/p")
py.test --collect-only tests/integration/ \
| sed -En "s/\s*<Module '([[:print:]]+)'>/\1/p")
i=0
TESTS=
for test in $CANDIDATES; do
if [ $(($i % $TOTAL_SHARDS)) -eq $SHARD ]; then
TESTS="$TESTS tests/integration_test.py::$test"
TESTS="$TESTS $test"
fi
i=$(($i + 1))
done