Skip to content

Commit 9bf7d79

Browse files
committed
[test] Mark freetype test as crossplaform. NFC
See emscripten-core#22585 (comment)
1 parent a756ff0 commit 9bf7d79

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ jobs:
919919
python: "$EMSDK_PYTHON"
920920
- run-tests:
921921
title: "crossplatform tests"
922-
test_targets: "--crossplatform-only"
922+
test_targets: "other.test_freetype_emscripten"
923923
- upload-test-results
924924
# Run a single websockify-based test to ensure it works on windows.
925925
- run-tests:

test/test_other.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2479,6 +2479,7 @@ def test_bzip2(self):
24792479

24802480
@with_all_sjlj
24812481
@requires_network
2482+
@crossplatform
24822483
def test_freetype(self):
24832484
# copy the Liberation Sans Bold truetype file located in the
24842485
# <emscripten_root>/test/freetype to the compilation folder

tools/shared.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@ def cap_max_workers_in_pool(max_workers):
153153
return max_workers
154154

155155

156+
def escape_for_cmd_exe(arg):
157+
arg = arg.replace('<', '^<')
158+
arg = arg.replace('>', '^>')
159+
return arg
160+
161+
156162
def run_multiple_processes(commands,
157163
env=None,
158164
route_stdout_to_temp_files_suffix=None,
@@ -205,10 +211,15 @@ def get_finished_process():
205211
stdout = temp_files.get(route_stdout_to_temp_files_suffix)
206212
else:
207213
stdout = None
214+
cmd = commands[i]
215+
print_compiler_stage(cmd)
208216
if DEBUG:
209-
logger.debug('Running subprocess %d/%d: %s' % (i + 1, len(commands), ' '.join(commands[i])))
210-
print_compiler_stage(commands[i])
211-
proc = subprocess.Popen(commands[i], stdout=stdout, stderr=None, env=env, cwd=cwd)
217+
logger.debug('Running subprocess %d/%d: %s' % (i + 1, len(commands), ' '.join(cmd)))
218+
if utils.WINDOWS:
219+
cmd = subprocess.list2cmdline(cmd)
220+
cmd = escape_for_cmd_exe(cmd)
221+
print(cmd)
222+
proc = subprocess.Popen(cmd, stdout=stdout, stderr=None, env=env, cwd=cwd)
212223
processes[i] = proc
213224
if route_stdout_to_temp_files_suffix:
214225
std_outs.append((i, stdout.name))

0 commit comments

Comments
 (0)