diff --git a/tests/distributed/runtests.sh b/tests/distributed/runtests.sh index a798802c874e..2e60b1c5aa98 100755 --- a/tests/distributed/runtests.sh +++ b/tests/distributed/runtests.sh @@ -1,9 +1,9 @@ #!/bin/bash echo "====== 1. Basic distributed test with Python ======" -PYTHONPATH=../../python-package/ ../../dmlc-core/tracker/dmlc-submit --cluster=local --num-workers=3\ +PYTHONPATH=../../python-package/ python ../../dmlc-core/tracker/dmlc-submit --cluster=local --num-workers=3\ python test_basic.py echo "====== 2. Regression test for issue #3402 ======" -PYTHONPATH=../../python-package/ ../../dmlc-core/tracker/dmlc-submit --cluster=local --num-workers=2 --worker-cores=1\ +PYTHONPATH=../../python-package/ python ../../dmlc-core/tracker/dmlc-submit --cluster=local --num-workers=2 --worker-cores=1\ python test_issue3402.py diff --git a/tests/travis/run_test.sh b/tests/travis/run_test.sh index 37d6ea9877a7..6a5faf36415d 100755 --- a/tests/travis/run_test.sh +++ b/tests/travis/run_test.sh @@ -147,6 +147,11 @@ fi if [ ${TASK} == "distributed_test" ]; then set -e make all || exit -1 + echo "-------------------------------" + source activate python3 + python --version + conda install numpy scipy + python -m pip install kubernetes cd tests/distributed ./runtests.sh fi diff --git a/tests/travis/setup.sh b/tests/travis/setup.sh index 546e803447d3..fb6892747496 100755 --- a/tests/travis/setup.sh +++ b/tests/travis/setup.sh @@ -10,8 +10,7 @@ if [ ${TASK} == "lint" ]; then fi -if [ ${TASK} == "python_test" ] || [ ${TASK} == "python_lightweight_test" ]; then - # python2 +if [ ${TASK} == "python_test" ] || [ ${TASK} == "python_lightweight_test" ] || [ ${TASK} == "distributed_test" ]; then if [ ${TRAVIS_OS_NAME} == "osx" ]; then wget -O conda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh else @@ -27,7 +26,3 @@ if [ ${TASK} == "python_test" ] || [ ${TASK} == "python_lightweight_test" ]; the conda create -n python3 python=3.5 conda create -n python2 python=2.7 fi - -if [ ${TASK} == "distributed_test" ]; then - pip install --user kubernetes numpy scipy -fi