Browse Source

Seek to end before checking the size of stderr output

This fixes the error message checks in virtual environments where temporary
files act weird.
zrythm_meson
David Robillard 4 years ago
parent
commit
ea9e3614ce
  1. 3
      waflib/extras/autowaf.py

3
waflib/extras/autowaf.py

@ -888,9 +888,10 @@ class TestScope: @@ -888,9 +888,10 @@ class TestScope:
if 'stderr' in kwargs and kwargs['stderr'] == NONEMPTY:
# Run with a temp file for stderr and check that it is non-empty
import tempfile
with tempfile.TemporaryFile(mode='w') as stderr:
with tempfile.TemporaryFile() as stderr:
kwargs['stderr'] = stderr
output = self.run(test, **kwargs)
stderr.seek(0, 2) # Seek to end
return (output if not output else
self.run(
lambda: stderr.tell() > 0,

Loading…
Cancel
Save