aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-05-03 20:18:43 +0200
committerDavid Robillard <d@drobilla.net>2021-03-08 23:23:06 -0500
commit0094dfffead41a6c3e84f9aad70911ffcb587fbd (patch)
treeec52758305a3dcbe385a166d63c276c67fed5c47 /test
parentf7b993d5aff1274e010d45304b12109f6de7e120 (diff)
downloadserd-0094dfffead41a6c3e84f9aad70911ffcb587fbd.tar.gz
serd-0094dfffead41a6c3e84f9aad70911ffcb587fbd.tar.bz2
serd-0094dfffead41a6c3e84f9aad70911ffcb587fbd.zip
Add input base URI option
Diffstat (limited to 'test')
-rw-r--r--test/meson.build1
-rwxr-xr-xtest/run_test_suite.py20
2 files changed, 15 insertions, 6 deletions
diff --git a/test/meson.build b/test/meson.build
index 49a3fe0c..8c09a91a 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -54,6 +54,7 @@ if get_option('utils')
endforeach
bad_args = [
+ ['-I'],
['-c'],
['-i', 'unknown'],
['-i'],
diff --git a/test/run_test_suite.py b/test/run_test_suite.py
index 6a595e98..d25fb3a1 100755
--- a/test/run_test_suite.py
+++ b/test/run_test_suite.py
@@ -83,8 +83,9 @@ def test_thru(
isyntax,
"-p",
"foo",
- path,
+ "-I",
base_uri,
+ path,
]
)
@@ -99,8 +100,9 @@ def test_thru(
"-c",
"foo",
"-a",
- out_path,
+ "-I",
base_uri,
+ out_path,
]
)
@@ -146,7 +148,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(
@@ -248,9 +250,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")