From f8ec5f0fceaeb7452acfe31a19b54c69e3c986a1 Mon Sep 17 00:00:00 2001 From: Zhou Wei <52485244+zhouwei25@users.noreply.github.com> Date: Mon, 20 Jul 2020 15:40:03 +0800 Subject: [PATCH] just skip case of distribute on windows (#25581) just skip case of distribute on windows --- python/paddle/fluid/tests/unittests/CMakeLists.txt | 2 -- python/paddle/fluid/tests/unittests/test_desc_clone.py | 3 +++ python/paddle/fluid/tests/unittests/test_program_code.py | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/CMakeLists.txt b/python/paddle/fluid/tests/unittests/CMakeLists.txt index aae15850d1..e4a11e5b7a 100644 --- a/python/paddle/fluid/tests/unittests/CMakeLists.txt +++ b/python/paddle/fluid/tests/unittests/CMakeLists.txt @@ -59,11 +59,9 @@ if(WIN32) # TODO: Fix these unittests failed on Windows LIST(REMOVE_ITEM TEST_OPS test_debugger) - list(REMOVE_ITEM TEST_OPS test_desc_clone) list(REMOVE_ITEM TEST_OPS test_fake_init_op) list(REMOVE_ITEM TEST_OPS test_merge_ids_op) list(REMOVE_ITEM TEST_OPS test_split_ids_op) - list(REMOVE_ITEM TEST_OPS test_program_code) LIST(REMOVE_ITEM TEST_OPS test_ref_by_trainer_id_op) LIST(REMOVE_ITEM TEST_OPS test_math_op_patch_var_base) endif() diff --git a/python/paddle/fluid/tests/unittests/test_desc_clone.py b/python/paddle/fluid/tests/unittests/test_desc_clone.py index 43bf39ccd5..6b49de536a 100644 --- a/python/paddle/fluid/tests/unittests/test_desc_clone.py +++ b/python/paddle/fluid/tests/unittests/test_desc_clone.py @@ -18,6 +18,7 @@ import numpy as np import argparse import time import math +import sys import paddle import paddle.fluid as fluid @@ -177,6 +178,8 @@ def program_equal(a, b): class TestDistMnist(unittest.TestCase): + @unittest.skipIf(sys.platform == "win32", + "Windows does not support distribution") def test_desc_clone(self): get_model(batch_size=20) diff --git a/python/paddle/fluid/tests/unittests/test_program_code.py b/python/paddle/fluid/tests/unittests/test_program_code.py index 036007c6ac..76ff3f37bf 100644 --- a/python/paddle/fluid/tests/unittests/test_program_code.py +++ b/python/paddle/fluid/tests/unittests/test_program_code.py @@ -15,6 +15,7 @@ import os import time import unittest +import sys from multiprocessing import Process import signal @@ -29,6 +30,8 @@ import paddle.fluid.layers.ops as ops class TestProgram2Code(unittest.TestCase): + @unittest.skipIf(sys.platform == "win32", + "Windows does not support distribution") def test_print(self): place = fluid.CPUPlace() self.init_serv(place) -- GitLab