Skip to content

Commit ad186ca

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

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-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
@@ -2484,6 +2484,7 @@ def test_bzip2(self):
24842484

24852485
@with_all_sjlj
24862486
@requires_network
2487+
@crossplatform
24872488
def test_freetype(self):
24882489
# copy the Liberation Sans Bold truetype file located in the
24892490
# <emscripten_root>/test/freetype to the compilation folder

tools/shared.py

Lines changed: 13 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,14 @@ 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+
proc = subprocess.Popen(cmd, stdout=stdout, stderr=None, env=env, cwd=cwd)
212222
processes[i] = proc
213223
if route_stdout_to_temp_files_suffix:
214224
std_outs.append((i, stdout.name))

0 commit comments

Comments
 (0)