From 0536b5263d188c54069765c4168bdba91ad250c7 Mon Sep 17 00:00:00 2001 From: gongweibao Date: Tue, 31 Mar 2020 23:42:35 -0500 Subject: [PATCH] fix test_launch_ps test=develop (#23333) --- python/paddle/fluid/tests/unittests/CMakeLists.txt | 2 +- python/paddle/fluid/tests/unittests/test_launch_ps.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/CMakeLists.txt b/python/paddle/fluid/tests/unittests/CMakeLists.txt index c4596471595..4ac3fff5255 100644 --- a/python/paddle/fluid/tests/unittests/CMakeLists.txt +++ b/python/paddle/fluid/tests/unittests/CMakeLists.txt @@ -302,7 +302,7 @@ if(WITH_DISTRIBUTE) # NOTE. test_launch only work in gpu collective mode bash_test_modules(test_launch MODULES test_launch.sh ENVS PADDLE_BINARY_DIR=${PADDLE_BINARY_DIR}) endif() - bash_test_modules(test_launch_ps MODULES test_launch_ps.sh) + bash_test_modules(test_launch_ps MODULES test_launch_ps.sh ENVS PADDLE_BINARY_DIR=${PADDLE_BINARY_DIR}) set(dist_ut_port 1000) foreach(TEST_OP ${DIST_TEST_OPS}) diff --git a/python/paddle/fluid/tests/unittests/test_launch_ps.sh b/python/paddle/fluid/tests/unittests/test_launch_ps.sh index 0bd722af03a..78452b5fe37 100644 --- a/python/paddle/fluid/tests/unittests/test_launch_ps.sh +++ b/python/paddle/fluid/tests/unittests/test_launch_ps.sh @@ -1,7 +1,8 @@ #!/bin/bash set -e # use default values -python -m paddle.distributed.launch_ps fleet_ps_training.py 2> ut.elog +launch_py=${PADDLE_BINARY_DIR}/python/paddle/distributed/launch_ps.py +python ${launch_py} fleet_ps_training.py 2> ut.elog if grep -q "server are killed" ut.elog; then echo "succeed" -- GitLab