JDevlieghere added inline comments.
================
Comment at:
lldb/test/API/functionalities/progress_reporting/TestTrimmedProgressReporting.py:29-30
+ self.launch(use_colors=True)
+ # Set the terminal to a random width
+ term_width = random.randint(10, 42)
+ self.expect("set set show-progress true")
----------------
I understand the motivation, but I think it's a bad idea to intentionally
introduce non-determinism in a test. Let's just make this a constant or repeat
the test for two (fixed) widths.
================
Comment at:
lldb/test/API/functionalities/progress_reporting/TestTrimmedProgressReporting.py:36-59
+ lines = []
+ with tempfile.NamedTemporaryFile() as tmpfile:
+ if self.TraceOn():
+ print("logfile: " + tmpfile.name)
+ with open(tmpfile.name, 'wb') as logfile:
+ self.child.logfile = logfile
+ self.expect("file " + self.getBuildArtifact("a.out"),
----------------
Why not use `self.child.expect_exact` with the exact sequence (including escape
characters) that you're trying to match? This seems to reimplementing part of
the pexpect functionality and I'm not sure we actually need it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124785/new/
https://reviews.llvm.org/D124785
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits