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:
+ msg = ("Invalid values for the --huntrleaks/-R parameters. The "
+ "number of warmups and repetitions must be at least 1 "
+ "each (1:1).")
+ print(msg, 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)
if loader.errors:
raise Exception("errors while loading tests")
support.run_unittest(tests)
- test_runner()
if ns.huntrleaks:
refleak = dash_R(the_module, test, test_runner, ns.huntrleaks)
+ else:
+ test_runner()
test_time = time.time() - start_time
post_test_cleanup()
except support.ResourceDenied as msg:
--- /dev/null
+Fix a bug in ``regrtest`` that caused an extra test to run if
+--huntrleaks/-R was used. Exit with error in case that invalid
+parameters are specified to --huntrleaks/-R (at least one warmup
+run and one repetition must be used).