Skip to content

Commit

Permalink
Merge pull request VUnit#229 from nathanaelhuffman/master
Browse files Browse the repository at this point in the history
TCL's command pipe will always return failing error codes on anything that prints to stderr
  • Loading branch information
kraigher authored Feb 11, 2017
2 parents 6244bb7 + 73046c5 commit e69ed41
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions vunit/vsim_simulator_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def _create_restart_function():
turn call the python command we actually wanted but in the
correct working directory using subprocess.call
-u flag is needed for continous output
-u flag is needed for continuous output
"""
recompile_command = [
sys.executable,
Expand All @@ -65,6 +65,9 @@ def _create_restart_function():
"--compile"] + sys.argv[1:]
recompile_command_visual = " ".join(recompile_command)

# stderr is intentionally re-directed to stdout so that the tcl's catch
# relies on the return code from the python process rather than being
# tricked by output going to stderr. See issue #228.
recompile_command_eval = [
"%s" % sys.executable,
"-u",
Expand All @@ -76,7 +79,7 @@ def _create_restart_function():
"bufsize=0, "
"universal_newlines=True, "
"stdout=sys.stdout, "
"stderr=sys.stderr))") % (recompile_command, abspath(os.getcwd()))]
"stderr=sys.stdout))") % (recompile_command, abspath(os.getcwd()))]
recompile_command_eval_tcl = " ".join(["{%s}" % part for part in recompile_command_eval])

tcl = """
Expand Down

0 comments on commit e69ed41

Please sign in to comment.