aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_test_suite.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/run_test_suite.py')
-rwxr-xr-xtest/run_test_suite.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/run_test_suite.py b/test/run_test_suite.py
index 2d52e576..6a595e98 100755
--- a/test/run_test_suite.py
+++ b/test/run_test_suite.py
@@ -211,6 +211,7 @@ def test_suite(
base_uri,
report_filename,
isyntax,
+ output_syntax,
command_prefix,
):
"""Run all tests in a test suite manifest."""
@@ -235,8 +236,11 @@ def test_suite(
def run_tests(test_class, tests, expected_return, results):
thru_flags = [["-e"], ["-f"], ["-b"], ["-r", "http://example.org/"]]
- osyntax = _test_output_syntax(test_class)
thru_options_iter = _option_combinations(thru_flags)
+ if output_syntax is not None:
+ osyntax = output_syntax
+ else:
+ osyntax = _test_output_syntax(test_class)
for test in sorted(tests):
test_uri = model[test][mf + "action"][0]
@@ -244,7 +248,9 @@ def test_suite(
test_name = os.path.basename(test_uri_path)
test_path = os.path.join(test_dir, test_name)
- command = command_prefix + ["-a"] + [test_path, test_uri]
+ command = (
+ command_prefix + ["-a", "-o", osyntax] + [test_path, test_uri]
+ )
command_string = " ".join(shlex.quote(c) for c in command)
out_filename = os.path.join(out_test_dir, test_name + ".out")
@@ -360,6 +366,7 @@ def main():
parser.add_argument("--report", help="path to write result report to")
parser.add_argument("--serdi", default="serdi", help="path to serdi")
parser.add_argument("--syntax", default="turtle", help="input syntax")
+ parser.add_argument("--osyntax", default=None, help="output syntax")
parser.add_argument("--wrapper", default="", help="executable wrapper")
parser.add_argument("manifest", help="test suite manifest.ttl file")
parser.add_argument("base_uri", help="base URI for tests")
@@ -377,6 +384,7 @@ def main():
args.base_uri,
args.report,
args.syntax,
+ args.osyntax,
command_prefix,
)