Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMartin Hořeňovský2022-06-14 23:42:00 +0200
committerMartin Hořeňovský2022-06-14 23:42:00 +0200
commitfa9416426adda74f41af014dd8b22ce17a7afca7 (patch)
treed2d5b5c9fd33134b5b4d2f9e3f0a8d986fd22a21
parent338e4ec1f8dc33f1f55ba1ab85b4ae73d0ffa65e (diff)
downloadcatch3-fa9416426adda74f41af014dd8b22ce17a7afca7.tar.gz
Refactor shared args in approvalTests.py
-rwxr-xr-xtools/scripts/approvalTests.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/scripts/approvalTests.py b/tools/scripts/approvalTests.py
index 3bd9c23f..098f40e3 100755
--- a/tools/scripts/approvalTests.py
+++ b/tools/scripts/approvalTests.py
@@ -200,23 +200,25 @@ print("Running approvals against executable:")
print(" " + cmdPath)
+base_args = ["--order", "lex", "--rng-seed", "1", "--colour-mode", "none"]
+
## special cases first:
# Standard console reporter
-approve("console.std", ["~[!nonportable]~[!benchmark]~[approvals] *", "--order", "lex", "--rng-seed", "1", "--colour-mode", "none"])
+approve("console.std", ["~[!nonportable]~[!benchmark]~[approvals] *"] + base_args)
# console reporter, include passes, warn about No Assertions, limit failures to first 4
-approve("console.swa4", ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions", "-x", "4", "--order", "lex", "--rng-seed", "1", "--colour-mode", "none"])
+approve("console.swa4", ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions", "-x", "4"] + base_args)
## Common reporter checks: include passes, warn about No Assertions
reporters = ('console', 'junit', 'xml', 'compact', 'sonarqube', 'tap', 'teamcity', 'automake')
for reporter in reporters:
filename = '{}.sw'.format(reporter)
- common_args = ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions", "--order", "lex", "--rng-seed", "1", "--colour-mode", "none"]
+ common_args = ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions"] + base_args
reporter_args = ['-r', reporter]
approve(filename, common_args + reporter_args)
## All reporters at the same time
-common_args = ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions", "--order", "lex", "--rng-seed", "1", "--colour-mode", "none"]
+common_args = ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions"] + base_args
filenames = ['{}.sw.multi'.format(reporter) for reporter in reporters]
reporter_args = []
for reporter, filename in zip(reporters, filenames):