Skip to content

Commit fad6e48

Browse files
authored
test: Don't implicitly add -I. when building test code. NFC (#17553)
Turns out there was only a single test that was relying on this behavior so its better to keep the default build command simpler/smaller.
1 parent 353fffe commit fad6e48

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

test/common.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -688,11 +688,8 @@ def build(self, filename, libraries=None, includes=None, force_c=False, js_outfi
688688
cmd += emcc_args
689689
if libraries:
690690
cmd += libraries
691-
if shared.suffix(filename) not in ('.i', '.ii'):
692-
# Add the location of the test file to include path.
693-
cmd += ['-I.']
694-
if includes:
695-
cmd += ['-I' + str(include) for include in includes]
691+
if includes:
692+
cmd += ['-I' + str(include) for include in includes]
696693

697694
self.run_process(cmd, stderr=self.stderr_redirect if not DEBUG else None)
698695
self.assertExists(output)

test/test_core.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7584,7 +7584,7 @@ def test_embind_no_rtti_followed_by_rtti(self):
75847584

75857585
@no_wasm64('webidl not compatible with MEMORY64 yet')
75867586
@parameterized({
7587-
'': (None, False),
7587+
'': ('DEFAULT', False),
75887588
'all': ('ALL', False),
75897589
'fast': ('FAST', False),
75907590
'default': ('DEFAULT', False),
@@ -7629,10 +7629,8 @@ def test_webidl(self, mode, allow_memory_growth):
76297629
if allow_memory_growth:
76307630
self.set_setting('ALLOW_MEMORY_GROWTH')
76317631

7632-
if not mode:
7633-
mode = 'DEFAULT'
76347632
expected = test_file('webidl/output_%s.txt' % mode)
7635-
self.do_run_from_file(test_file('webidl/test.cpp'), expected)
7633+
self.do_run_from_file(test_file('webidl/test.cpp'), expected, includes=['.'])
76367634

76377635
### Tests for tools
76387636

0 commit comments

Comments
 (0)