diff options
author | YAMAMOTO Takashi <yamamoto@valinux.co.jp> | 2013-05-17 11:43:13 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2013-05-18 05:55:05 +0900 |
commit | 3b7d91e922559142edb3a105538828a9c1dfc717 (patch) | |
tree | d5fe9837ec380dae049b76be487a7d598858ccb8 | |
parent | 688f1967248a523fe80d55d7869f72d4da757409 (diff) |
run_tests: make python interpreter overridable
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rwxr-xr-x | run_tests.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/run_tests.sh b/run_tests.sh index bf703a67..1c6199bb 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -1,5 +1,9 @@ #!/bin/sh +if [ -z "${PYTHON}" ]; then + PYTHON=python +fi + usage() { echo "Usage: $0 [OPTION]..." echo "Run Ryu's test suite(s)" @@ -116,7 +120,7 @@ run_integrated() { sudo PYTHONPATH=. nosetests -s $INTEGRATED_TEST_RUNNER } #NOSETESTS="nosetests $noseopts $noseargs" -NOSETESTS="python ./ryu/tests/run_tests.py $noseopts $noseargs" +NOSETESTS="${PYTHON} ./ryu/tests/run_tests.py $noseopts $noseargs" #if [ -n "$PLUGIN_DIR" ] #then @@ -139,14 +143,14 @@ then else if [ $always_venv -eq 1 ]; then # Automatically install the virtualenv - python tools/install_venv.py + ${PYTHON} tools/install_venv.py wrapper="${with_venv}" else echo -e "No virtual environment found...create one? (Y/n) \c" read use_ve if [ "x$use_ve" = "xY" -o "x$use_ve" = "x" -o "x$use_ve" = "xy" ]; then # Install the virtualenv and run the test suite in it - python tools/install_venv.py + ${PYTHON} tools/install_venv.py wrapper=${with_venv} fi fi |