Skip to content

Commit 46b13ef

Browse files
tiranmiss-islington
authored andcommitted
pythongh-90473: Skip get_config_h() tests on WASI (pythonGH-93645)
(cherry picked from commit 6099611) Co-authored-by: Christian Heimes <[email protected]>
1 parent 2084f94 commit 46b13ef

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Lib/distutils/tests/test_sysconfig.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from distutils import sysconfig
1111
from distutils.ccompiler import get_default_compiler
1212
from distutils.tests import support
13-
from test.support import run_unittest, swap_item, requires_subprocess
13+
from test.support import run_unittest, swap_item, requires_subprocess, is_wasi
1414
from test.support.os_helper import TESTFN
1515
from test.support.warnings_helper import check_warnings
1616

@@ -32,6 +32,7 @@ def cleanup_testfn(self):
3232
elif os.path.isdir(TESTFN):
3333
shutil.rmtree(TESTFN)
3434

35+
@unittest.skipIf(is_wasi, "Incompatible with WASI mapdir and OOT builds")
3536
def test_get_config_h_filename(self):
3637
config_h = sysconfig.get_config_h_filename()
3738
self.assertTrue(os.path.isfile(config_h), config_h)

Lib/test/test_sysconfig.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
import shutil
66
from copy import copy
77

8-
from test.support import (captured_stdout, PythonSymlink, requires_subprocess)
8+
from test.support import (
9+
captured_stdout, PythonSymlink, requires_subprocess, is_wasi
10+
)
911
from test.support.import_helper import import_module
1012
from test.support.os_helper import (TESTFN, unlink, skip_unless_symlink,
1113
change_cwd)
@@ -328,6 +330,7 @@ def test_get_platform(self):
328330

329331
# XXX more platforms to tests here
330332

333+
@unittest.skipIf(is_wasi, "Incompatible with WASI mapdir and OOT builds")
331334
def test_get_config_h_filename(self):
332335
config_h = sysconfig.get_config_h_filename()
333336
self.assertTrue(os.path.isfile(config_h), config_h)
@@ -499,6 +502,7 @@ class MakefileTests(unittest.TestCase):
499502

500503
@unittest.skipIf(sys.platform.startswith('win'),
501504
'Test is not Windows compatible')
505+
@unittest.skipIf(is_wasi, "Incompatible with WASI mapdir and OOT builds")
502506
def test_get_makefile_filename(self):
503507
makefile = sysconfig.get_makefile_filename()
504508
self.assertTrue(os.path.isfile(makefile), makefile)

0 commit comments

Comments
 (0)