Skip to content

Commit

Permalink
tools: Remove buffering for test .log and .trs files
Browse files Browse the repository at this point in the history
These files are useful to see when a unit test has hung, and where
it has hung. When buffered, they typically remain at zero length
until the test process exits. It's far more useful to inspect
these during the hang.

Closes cockpit-project#9603
  • Loading branch information
stefwalter authored and martinpitt committed Jul 6, 2018
1 parent 3f81fa0 commit beac530
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/tap-driver
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ class Driver:
def __init__(self, args):
self.argv = args.command
self.test_name = args.test_name
self.log = open(args.log_file, "wb")
self.log = open(args.log_file, "wb", 0)
self.log.write(("# %s\n" % " ".join(sys.argv)).encode("UTF-8"))
self.trs = open(args.trs_file, "w")
self.trs = open(args.trs_file, "w", 1)
self.color_tests = args.color_tests
self.expect_failure = args.expect_failure
self.width = terminal_width() - 9
Expand Down

0 comments on commit beac530

Please sign in to comment.