Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

TST: Added Script for running tox instances in parallel.

  • Loading branch information...
commit c8e877900a5d5f2a09a7c97a9fbd44cbeb496b7c 1 parent 0947ff0
@y-p y-p authored
Showing with 77 additions and 0 deletions.
  1. +54 −0 tox_prll.ini
  2. +23 −0 tox_prll.sh
View
54 tox_prll.ini
@@ -0,0 +1,54 @@
+# Tox (http://tox.testrun.org/) is a tool for running tests
+# in multiple virtualenvs. This configuration file will run the
+# test suite on all supported python versions. To use it, "pip install tox"
+# and then run "tox" from this directory.
+
+[tox]
+envlist = py25, py26, py27, py31, py32
+sdistsrc = {env:DISTFILE}
+
+[testenv]
+deps =
+ cython
+ numpy >= 1.6.1
+ nose
+ pytz
+
+# cd to anything but the default {toxinidir} which
+# contains the pandas subdirectory and confuses
+# nose away from the fresh install in site-packages
+changedir = {envdir}
+
+commands =
+ # TODO: --exe because of GH #761
+ {envbindir}/nosetests --exe pandas.tests
+ # cleanup the temp. build dir created by the tox build
+ /bin/rm -rf {toxinidir}/build
+
+ # quietly rollback the install.
+ # Note this line will only be reached if the tests
+ # previous lines succeed (in particular, the tests),
+ # but an uninstall is really only required when
+ # files are removed from source tree, in which case,
+ # stale versions of files will will remain in the venv,
+ # until the next time uninstall is run.
+ #
+ # tox should provide a preinstall-commands hook.
+ pip uninstall pandas -qy
+
+
+[testenv:py25]
+deps =
+ cython
+ numpy >= 1.6.1
+ nose
+ pytz
+ simplejson
+
+[testenv:py26]
+
+[testenv:py27]
+
+[testenv:py31]
+
+[testenv:py32]
View
23 tox_prll.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+#
+# tox has an undocumented (as of 1.4.2) config option called "sdistsrc"
+# which can make a run use a pre-prepared sdist file.
+# we prepare the sdist once , then launch the tox runs in parallel using it.
+#
+# currently (tox 1.4.2) We have to skip sdist generation when running in parallel
+# or we get a race.
+#
+
+
+ENVS=$(cat tox.ini | grep envlist | tr "," " " | cut -d " " -f 3-)
+TOX_INI_PAR="tox_prll.ini"
+
+echo "[Creating distfile]"
+tox --sdistonly
+export DISTFILE="$(find .tox/dist -type f )"
+
+echo -e "[Starting tests]\n"
+for e in $ENVS; do
+ echo "[launching tox for $e]"
+ tox -c "$TOX_INI_PAR" -e "$e" &
+done
Please sign in to comment.
Something went wrong with that request. Please try again.