diff options
author | peterjc123 <peter_jiachen@163.com> | 2018-04-12 18:12:39 +0800 |
---|---|---|
committer | Adam Paszke <adam.paszke@gmail.com> | 2018-04-12 12:12:39 +0200 |
commit | d45f3d0d5c7211b757ead1c89db0c58ad62068b4 (patch) | |
tree | fb320739963f2dc2f00157c51021fd476b607348 /test/run_test.py | |
parent | 8849bea120e0c3a4631f6c97f01c55819df14beb (diff) | |
download | pytorch-d45f3d0d5c7211b757ead1c89db0c58ad62068b4.tar.gz pytorch-d45f3d0d5c7211b757ead1c89db0c58ad62068b4.tar.bz2 pytorch-d45f3d0d5c7211b757ead1c89db0c58ad62068b4.zip |
Skip cpp_extensions test when possible on Windows (#6423)
Diffstat (limited to 'test/run_test.py')
-rw-r--r-- | test/run_test.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/run_test.py b/test/run_test.py index d1747b83d0..795997d4e9 100644 --- a/test/run_test.py +++ b/test/run_test.py @@ -95,8 +95,7 @@ def test_cpp_extensions(python, test_module, test_directory, options): if sys.platform == 'win32': install_directory = os.path.join(cpp_extensions, 'install') install_directories = get_shell_output( - "where -r \"{}\" *.pyd".format(install_directory)).split( - '\r\n') + 'where -r "{}" *.pyd'.format(install_directory)).split('\r\n') assert install_directories, 'install_directory must not be empty' @@ -236,6 +235,11 @@ def get_selected_tests(options): selected_tests = selected_tests[:last_index + 1] if sys.platform == 'win32' and not options.ignore_win_blacklist: + ostype = os.environ.get('MSYSTEM') + target_arch = os.environ.get('VSCMD_ARG_TGT_ARCH') + if ostype != 'MINGW64' or target_arch != 'x64': + WINDOWS_BLACKLIST.append('cpp_extensions') + for test in WINDOWS_BLACKLIST: if test in selected_tests: print_to_stderr('Excluding {} on Windows'.format(test)) |