From 209b5fc3d5c80d55061baaf67da2510427808e8d Mon Sep 17 00:00:00 2001 From: Bing Xu Date: Wed, 10 Apr 2019 03:34:49 -0700 Subject: [PATCH] [Python3] Update test --- tests/python/unittest/test_module_load.py | 2 +- tests/scripts/task_java_unittest.sh | 8 ++++---- tests/scripts/task_python_docs.sh | 2 +- tests/scripts/task_python_integration.sh | 2 ++ tests/scripts/task_web_test.sh | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/python/unittest/test_module_load.py b/tests/python/unittest/test_module_load.py index ca508f88f1a77..ba50448253089 100644 --- a/tests/python/unittest/test_module_load.py +++ b/tests/python/unittest/test_module_load.py @@ -82,7 +82,7 @@ def save_object(names): fo.write(runtime_py) subprocess.check_call( - "python %s %s %s" % (path_runtime_py, path_dso, dtype), + "python3 %s %s %s" % (path_runtime_py, path_dso, dtype), shell=True) diff --git a/tests/scripts/task_java_unittest.sh b/tests/scripts/task_java_unittest.sh index 6dc25c825c04c..63f16fd755f6c 100755 --- a/tests/scripts/task_java_unittest.sh +++ b/tests/scripts/task_java_unittest.sh @@ -26,13 +26,13 @@ CURR_DIR=$(cd `dirname $0`; pwd) SCRIPT_DIR=$CURR_DIR/../../jvm/core/src/test/scripts TEMP_DIR=$(mktemp -d) -python $SCRIPT_DIR/test_add_cpu.py $TEMP_DIR -python $SCRIPT_DIR/test_add_gpu.py $TEMP_DIR -python $SCRIPT_DIR/test_graph_runtime.py $TEMP_DIR +python3 $SCRIPT_DIR/test_add_cpu.py $TEMP_DIR +python3 $SCRIPT_DIR/test_add_gpu.py $TEMP_DIR +python3 $SCRIPT_DIR/test_graph_runtime.py $TEMP_DIR # start rpc proxy server PORT=$(( ( RANDOM % 1000 ) + 9000 )) -python $SCRIPT_DIR/test_rpc_proxy_server.py $PORT 30 & +python3 $SCRIPT_DIR/test_rpc_proxy_server.py $PORT 30 & make jvmpkg make jvmpkg JVM_TEST_ARGS="-DskipTests=false \ diff --git a/tests/scripts/task_python_docs.sh b/tests/scripts/task_python_docs.sh index d824d958d0deb..b2a3fc1cb1761 100755 --- a/tests/scripts/task_python_docs.sh +++ b/tests/scripts/task_python_docs.sh @@ -40,7 +40,7 @@ mv jvm/core/target/site/apidocs docs/_build/html/javadoc rm -rf python/tvm/*.pyc python/tvm/*/*.pyc python/tvm/*/*/*.pyc cd docs -PYTHONPATH=`pwd`/../python3 make html +PYTHONPATH=`pwd`/../python make html cd _build/html tar czf docs.tgz * mv docs.tgz ../../../ diff --git a/tests/scripts/task_python_integration.sh b/tests/scripts/task_python_integration.sh index 226134c2a9710..85dd6de64f6d7 100755 --- a/tests/scripts/task_python_integration.sh +++ b/tests/scripts/task_python_integration.sh @@ -33,6 +33,8 @@ rm -rf lib make cd ../.. +python3 -m nose -v apps/extension/tests + TVM_FFI=ctypes python3 -m nose -v tests/python/integration TVM_FFI=ctypes python3 -m nose -v tests/python/contrib diff --git a/tests/scripts/task_web_test.sh b/tests/scripts/task_web_test.sh index 38cb914491a5b..4b383a1780aa3 100755 --- a/tests/scripts/task_web_test.sh +++ b/tests/scripts/task_web_test.sh @@ -19,7 +19,7 @@ set -e set -u -export PYTHONPATH=python3 +export PYTHONPATH=python cp /emsdk-portable/.emscripten ~/.emscripten source /emsdk-portable/emsdk_env.sh