Skip to content

Commit

Permalink
fleshes out run_script tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom O'Hara committed Sep 30, 2023
1 parent a6ab4c3 commit 443fc54
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mezcla/unittest_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@ def run_script(self, options=None, data_file=None, log_file=None, trace_level=4,
- issues warning if script invocation leads to error
- if USES_STDIN, requires explicit empty string for DATA_FILE to avoid use of - (n.b., as a precaution against hangups)"""
debug.trace_fmtd(trace_level + 1,
"TestWrapper.run_script({env}, {opts}, {df}, {lf}, {of}",
opts=options, df=data_file, lf=log_file,
of=out_file, env=env_options)
"TestWrapper.run_script(opts={opts}, data={df}, log={lf}, lvl={lvl}, out={of}, env={env}, stdin={stdin}, post={post}, back={back})",
opts=options, df=data_file, lf=log_file, lvl=trace_level, of=out_file,
env=env_options, stdin=uses_stdin, post=post_options, back=background)
if options is None:
options = ""
if env_options is None:
Expand Down Expand Up @@ -315,8 +315,7 @@ def run_script(self, options=None, data_file=None, log_file=None, trace_level=4,
error_found = my_re.search(r"(\S+error:)|(no module)|(command not found)",
log_contents.lower())
debug.assertion(not error_found)
debug.trace_fmt(trace_level + 1, "log contents: {{\n{log}\n}}",
log=gh.indent_lines(log_contents))
debug.trace_expr(trace_level + 1, log_contents, max_len=2048)

# Do sanity check for python exceptions
traceback_found = my_re.search("Traceback.*most recent call", log_contents)
Expand Down

0 comments on commit 443fc54

Please sign in to comment.