mirror of
https://github.com/corundum/corundum.git
synced 2025-01-30 08:32:52 +08:00
fpga/build_images.py: process both stdout and stderr
Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
parent
cc99484d99
commit
d6186eff88
@ -144,13 +144,10 @@ class Build:
|
|||||||
stdout=asyncio.subprocess.PIPE,
|
stdout=asyncio.subprocess.PIPE,
|
||||||
stderr=asyncio.subprocess.PIPE)
|
stderr=asyncio.subprocess.PIPE)
|
||||||
|
|
||||||
while True:
|
await asyncio.gather(
|
||||||
line = await proc.stdout.readline()
|
self.process_stream(proc.stdout),
|
||||||
if not line:
|
self.process_stream(proc.stderr),
|
||||||
break
|
)
|
||||||
line = line.decode('utf-8').strip()
|
|
||||||
|
|
||||||
self.scan_log_line(line)
|
|
||||||
|
|
||||||
self.synth_done()
|
self.synth_done()
|
||||||
self.build_done()
|
self.build_done()
|
||||||
@ -166,6 +163,15 @@ class Build:
|
|||||||
|
|
||||||
self.elapsed_time = datetime.datetime.now() - self.start_time
|
self.elapsed_time = datetime.datetime.now() - self.start_time
|
||||||
|
|
||||||
|
async def process_stream(self, stream):
|
||||||
|
while True:
|
||||||
|
line = await stream.readline()
|
||||||
|
if not line:
|
||||||
|
break
|
||||||
|
line = line.decode('utf-8').strip()
|
||||||
|
|
||||||
|
self.scan_log_line(line)
|
||||||
|
|
||||||
def scan_log_line(self, line):
|
def scan_log_line(self, line):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user