diff --git a/run_tests.sh b/run_tests.sh index 14b38ad0dc5..498f506d30a 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -3,8 +3,6 @@ pwd_dir=$(pwd) cd `dirname $0` -./scripts/common_startup.sh - # A good place to look for nose info: http://somethingaboutorange.com/mrl/projects/nose/ rm -f run_functional_tests.log @@ -46,6 +44,7 @@ Extra options: --debug On python test error or failure invoke a pdb shell for interactive debugging of the test --report_file Path of HTML report to produce (for Python Galaxy functional tests). --xunit_report_file Path of XUnit report to produce (for Python Galaxy functional tests). + --skip-venv Do not create .venv (passes this flag to common_startup.sh) --dockerize Run tests in a pre-configured Docker container (must be first argument if present). --db For use with --dockerize, run tests using partially migrated 'postgres', 'mysql', or 'sqlite' databases. @@ -267,6 +266,10 @@ do watch=1 shift ;; + --skip-venv) + skip_venv='--skip-venv' + shift + ;; --) shift break @@ -282,6 +285,8 @@ do esac done +./scripts/common_startup.sh $skip_venv + if [ -n "$migrated_test" ] ; then [ -n "$test_id" ] && class=":TestForTool_$test_id" || class="" extra_args="functional.test_toolbox$class -migrated" diff --git a/scripts/common_startup.sh b/scripts/common_startup.sh index 6a33228d332..394b8ef0295 100755 --- a/scripts/common_startup.sh +++ b/scripts/common_startup.sh @@ -55,8 +55,8 @@ if [ ! -f $GALAXY_CONFIG_FILE ]; then fi if [ $SET_VENV -eq 1 ]; then - # If not already in a virtualenv and .venv does not exist, attempt to create it. - if [ -z "$VIRTUAL_ENV" -a ! -d .venv ] + # If .venv does not exist, attempt to create it. + if [ ! -d .venv ] then vvers=13.1.0 vurl="https://pypi.python.org/packages/source/v/virtualenv/virtualenv-${vvers}.tar.gz" diff --git a/tox.ini b/tox.ini index 3aa17c11e1f..24bf4de692e 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,7 @@ whitelist_externals = bash deps = flake8 [testenv:py27-unit] -commands = bash run_tests.sh -u +commands = bash run_tests.sh --skip-venv -u whitelist_externals = bash deps = nose @@ -21,7 +21,7 @@ deps = mock [testenv:py26-unit] -commands = bash run_tests.sh -u +commands = bash run_tests.sh --skip-venv -u whitelist_externals = bash deps = unittest2