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
Add check for invalid --huntrleaks/-R parameters
  • Loading branch information
pablogsal committed Jun 15, 2018
commit bc1c8741f77d0459b698629c388c6985e40022a1
7 changes: 7 additions & 0 deletions Lib/test/libregrtest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,13 @@ def main(self, tests=None, **kwargs):
def _main(self, tests, kwargs):
self.ns = self.parse_args(kwargs)

if self.ns.huntrleaks:
warmup, repetitions, _ = self.ns.huntrleaks
if warmup < 1 or repetitions < 1:
print("Invalid values for the --huntrleaks/-R parameters",

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.

You must mention the minimum number of warmups and minimum number of repetitions (1 and 1).

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

if self.ns.slaveargs is not None:
from test.libregrtest.runtest_mp import run_tests_slave
run_tests_slave(self.ns.slaveargs)
Expand Down