Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! Add check for invalid --huntrleaks/-R parameters
  • Loading branch information
pablogsal committed Jun 16, 2018
commit 7510359dff84e150d9c307083b8b71869c7bed4d
6 changes: 4 additions & 2 deletions Lib/test/libregrtest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,10 @@ def _main(self, tests, kwargs):
if self.ns.huntrleaks:
warmup, repetitions, _ = self.ns.huntrleaks
if warmup < 1 or repetitions < 1:
print("Invalid values for the --huntrleaks/-R parameters",
file=sys.stderr, flush=True)
msg = ("Invalid values for the --huntrleaks/-R parameters. The "
"number of warmups and repetitions must be at least 1 "
"each (1:1).")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: maybe write "(-R 1:1)" rather than "(1:1)"?

print(msg, file=sys.stderr, flush=True)
sys.exit(2)

if self.ns.slaveargs is not None:
Expand Down