diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-12-10 13:12:09 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-12-11 16:22:31 +0100 |
| commit | 3898c6e674907f2ee647626b2408c7b325ae9b82 (patch) | |
| tree | a9341848a73a65c1a8b21db35e9ebf119b15694f /testing/command.py | |
| parent | 84667663e0675c0115a4ec9f193ed6d06bd4d375 (diff) | |
testrunner: Add command line for the number of re-runs
As a drive-by, fix command the line help (needs to be f-string).
Pick-to: 6.8
Change-Id: I96b38c41bca303af313402a93e3d4c7a350de4df
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'testing/command.py')
| -rw-r--r-- | testing/command.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/testing/command.py b/testing/command.py index d073e6fb1..5b68e055f 100644 --- a/testing/command.py +++ b/testing/command.py @@ -139,10 +139,11 @@ def main(): all_projects = "shiboken6 pyside6".split() tested_projects = "shiboken6 pyside6".split() tested_projects_quoted = " ".join("'i'" for i in tested_projects) + runs = COIN_TESTING parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, description=dedent( - """\ + f"""\ Run the tests for some projects, default = {tested_projects_quoted}. Testing is now repeated up to {COIN_TESTING} times, and errors are @@ -177,6 +178,8 @@ def main(): type=int, help="use build number n (0-based), latest = -1 (default)", ) + parser_test.add_argument("--reruns", "-r", default=COIN_TESTING, type=int, + help=f"Number of re-runs (defaults to {COIN_TESTING})") parser_test.add_argument( "--projects", nargs="+", @@ -209,7 +212,7 @@ def main(): print(builds.selected.build_dir, "written to file", args.filename.name) sys.exit(0) elif args.subparser_name == "test": - pass # we do it afterwards + runs = args.reruns elif args.subparser_name == "list": rp = os.path.relpath print() @@ -256,7 +259,6 @@ def main(): q = 5 * [0] - runs = COIN_TESTING fail_crit = COIN_THRESHOLD # now loop over the projects and accumulate fatal = False |
