Skip to content

Commit

Permalink
execution debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Kha authored and Johannes Bechberger committed Aug 24, 2020
1 parent dfe873a commit 5cb242d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions temci/run/run_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,7 @@ def _exec_command(self, cmds: list, block: RunProgramBlock,

try:
t = time.time()
logging.debug("Running {} in directory {}".format(repr(executed_cmd), cwd))
proc = subprocess.Popen(["/bin/sh", "-c", executed_cmd],
stdout=subprocess.PIPE if redirect_out else None,
stderr=subprocess.PIPE if redirect_out else None,
Expand All @@ -791,6 +792,13 @@ def _exec_command(self, cmds: list, block: RunProgramBlock,
out, err = proc.communicate(timeout=timeout if timeout > -1 else None)
t = time.time() - t
rusage = proc.rusage
logging.debug("""
===STDOUT===
{}
===END STDOUT===
===STDERR===
{}
===END STDERR===""".format(str(out), str(err)))
if redirect_out:
ExecValidator(block["validator"]).validate(cmd, clean_output(out), clean_output(err), proc.poll())
# if proc.poll() > 0:
Expand Down

0 comments on commit 5cb242d

Please sign in to comment.