Skip to content

Commit f522adb

Browse files
authored
Merge pull request #88 from antmicro/fix-output-when-error
Fix output when error
2 parents ec5184e + 4757144 commit f522adb

File tree

2 files changed

+29
-16
lines changed

2 files changed

+29
-16
lines changed

exhaust.py

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -126,25 +126,38 @@ def iter_options(args):
126126

127127

128128
def worker(arglist):
129+
def eprint(*args, **kwargs):
130+
print(*args, file=sys.stderr, **kwargs)
131+
129132
out_prefix, verbose, project, family, device, package, board, toolchain = arglist
130133
# We don't want output of all subprocesses here
131134
# Log files for each build will be placed in build directory
132135
with redirect_stdout(open(os.devnull, 'w')):
133-
run(
134-
family,
135-
device,
136-
package,
137-
board,
138-
toolchain,
139-
project,
140-
None, #out_dir
141-
out_prefix,
142-
None, #strategy
143-
None, #carry
144-
None, #seed
145-
None, #build
146-
verbose
147-
)
136+
try:
137+
run(
138+
family,
139+
device,
140+
package,
141+
board,
142+
toolchain,
143+
project,
144+
None, #out_dir
145+
out_prefix,
146+
None, #strategy
147+
None, #carry
148+
None, #seed
149+
None, #build
150+
verbose
151+
)
152+
except Exception as e:
153+
eprint("\n---------------------")
154+
eprint(
155+
"ERROR: {} {} {}{}{} {} test has failed\n".format(
156+
project, toolchain, family, device, package, board
157+
)
158+
)
159+
eprint("ERROR MESSAGE: ", e)
160+
eprint("---------------------\n")
148161

149162

150163
def main():

third_party/edalize

0 commit comments

Comments
 (0)