aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_test_suite.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-05-03 20:18:43 +0200
committerDavid Robillard <d@drobilla.net>2022-01-13 23:05:20 -0500
commitda82a1c9f9fc5a359d3af6641011c4ae68262866 (patch)
treeeb77aecce5b8e8d1df9d0b1e28eec16f4465fcd3 /test/run_test_suite.py
parent4dc7f00c2a312937073c63960307910da739c27b (diff)
downloadserd-da82a1c9f9fc5a359d3af6641011c4ae68262866.tar.gz
serd-da82a1c9f9fc5a359d3af6641011c4ae68262866.tar.bz2
serd-da82a1c9f9fc5a359d3af6641011c4ae68262866.zip
Add input base URI option
Diffstat (limited to 'test/run_test_suite.py')
-rwxr-xr-xtest/run_test_suite.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/test/run_test_suite.py b/test/run_test_suite.py
index 7a3b5e88..f23f29e6 100755
--- a/test/run_test_suite.py
+++ b/test/run_test_suite.py
@@ -85,8 +85,9 @@ def test_thru(
"foo",
"-w",
out_path,
- path,
+ "-I",
base_uri,
+ path,
]
)
@@ -103,8 +104,9 @@ def test_thru(
"-w",
thru_path,
"-a",
- out_path,
+ "-I",
base_uri,
+ out_path,
]
)
@@ -168,7 +170,7 @@ def _load_rdf(filename, base_uri, command_prefix):
model = {}
instances = {}
- cmd = command_prefix + [filename, base_uri]
+ cmd = command_prefix + ["-I", base_uri, filename]
proc = subprocess.run(cmd, capture_output=True, check=True)
for line in proc.stdout.splitlines():
matches = re.match(
@@ -275,9 +277,15 @@ def test_suite(
test_name = os.path.basename(test_uri_path)
test_path = os.path.join(test_dir, test_name)
- command = (
- command_prefix + ["-a", "-o", osyntax] + [test_path, test_uri]
- )
+ command = command_prefix + [
+ "-a",
+ "-o",
+ osyntax,
+ "-I",
+ test_uri,
+ test_path,
+ ]
+
command_string = " ".join(shlex.quote(c) for c in command)
out_filename = os.path.join(out_test_dir, test_name + ".out")