Skip to content

Commit 84edcf3

Browse files
committed
yet moar
1 parent 87f8161 commit 84edcf3

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

tests/test_other.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2341,16 +2341,22 @@ def test_debuginfo(self):
23412341
(['-O2'], False),
23422342
(['-O2', '-g'], True),
23432343
]:
2344-
print(args, expect_debug)
2344+
print('b1', args, expect_debug)
23452345
err = run_process([PYTHON, EMCC, path_from_root('tests', 'hello_world.cpp')] + args, stdout=PIPE, stderr=PIPE).stderr
2346+
print('b2', args, expect_debug)
23462347
lines = err.splitlines()
2348+
print('b3', args, expect_debug)
23472349
if self.is_wasm_backend():
2350+
print('b4', args, expect_debug)
23482351
finalize = [l for l in lines if 'wasm-emscripten-finalize' in l][0]
2352+
print('b5', args, expect_debug)
23492353
if expect_debug:
23502354
self.assertIn(' -g ', finalize)
23512355
else:
23522356
self.assertNotIn(' -g ', finalize)
2357+
print('b6', args, expect_debug)
23532358
else:
2359+
print('b7', args, expect_debug)
23542360
opts = '\n'.join([l for l in lines if 'LLVM opts:' in l])
23552361
if expect_debug:
23562362
self.assertNotIn('strip-debug', opts)

tools/shared.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,22 +151,33 @@ def check_returncode(self):
151151

152152

153153
def run_process(cmd, check=True, input=None, universal_newlines=True, *args, **kw):
154+
print('rp1');
154155
kw.setdefault('universal_newlines', True)
155156

156157
if hasattr(subprocess, "run"):
158+
print('rp1.5');
157159
return subprocess.run(cmd, check=check, input=input, *args, **kw)
160+
print('rp2');
158161

159162
# Python 2 compatibility: Introduce Python 3 subprocess.run-like behavior
160163
if input is not None:
164+
print('rp3');
161165
kw['stdin'] = subprocess.PIPE
162166
proc = Popen(cmd, *args, **kw)
167+
print('rp4');
163168
stdout, stderr = proc.communicate(input)
169+
print('rp5');
164170
result = Py2CompletedProcess(cmd, proc.returncode, stdout, stderr)
171+
print('rp6');
165172
if check:
173+
print('rp7');
166174
result.check_returncode()
175+
print('rp8');
167176
logger.debug('Successfully executed %s' % ' '.join(cmd))
168177
else:
178+
print('rp9');
169179
logger.debug('Executed %s' % ' '.join(cmd))
180+
print('rpA');
170181
return result
171182

172183

0 commit comments

Comments
 (0)