diff options
author | David Robillard <d@drobilla.net> | 2023-04-03 09:00:10 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-04-05 09:45:15 -0400 |
commit | f1adf9a4999d80d26314565d0c1f49c4471e5851 (patch) | |
tree | 0ac4e60a639ad02ac871f2dfbeb795ba67e96f44 /test/run_suite.py | |
parent | 0535ad8cab467c922be226f971914a1a148b0f37 (diff) | |
download | serd-f1adf9a4999d80d26314565d0c1f49c4471e5851.tar.gz serd-f1adf9a4999d80d26314565d0c1f49c4471e5851.tar.bz2 serd-f1adf9a4999d80d26314565d0c1f49c4471e5851.zip |
Replace complicated test support code
Everything covered by the old hairy runner script is now covered by more
focused test suites, so the "thru" pass can be eliminated without losing
significant coverage.
Diffstat (limited to 'test/run_suite.py')
-rwxr-xr-x | test/run_suite.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/test/run_suite.py b/test/run_suite.py index 6426b0c2..9c3d27ee 100755 --- a/test/run_suite.py +++ b/test/run_suite.py @@ -119,13 +119,21 @@ def run_suite(args, command, out_dir): if klass not in TEST_TYPES: raise RuntimeError("Unknown manifest entry type: " + klass) - for instance in instances: + for uri in instances: try: - entry = model[instance] + entry = model[uri] if check and NS_MF + "result" not in entry: - raise RuntimeError("Eval test missing result: " + instance) + raise RuntimeError("Eval test missing result: " + uri) - results.check(run_entry(args, entry, command, out_dir, top)) + # Run test and record result + passed = run_entry(args, entry, command, out_dir, top) + results.check(passed) + + # Write test report entry + if args.report: + with open(args.report, "a", encoding="utf-8") as report: + text = util.earl_assertion(uri, passed, args.asserter) + report.write(text) except subprocess.CalledProcessError as exception: if exception.stderr is not None: @@ -144,7 +152,9 @@ def main(): description=__doc__, ) + parser.add_argument("--asserter", help="asserter URI for test report") parser.add_argument("--lax", action="store_true", help="tolerate errors") + parser.add_argument("--report", help="path to write result report to") parser.add_argument("--reverse", action="store_true", help="reverse test") parser.add_argument("--serdi", default="serdi", help="path to serdi") parser.add_argument("--wrapper", default="", help="executable wrapper") |