aboutsummaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-14 18:39:39 +0200
committerDavid Robillard <d@drobilla.net>2020-08-14 19:07:52 +0200
commitada2909ca27bd52be4a91d1d985661a0300cd77a (patch)
tree7250395fd7bad7be8b1068d8d3d461fd187d9e3b /wscript
parent3a9bd46a3e02a69052f57741c6778b9ff49664fc (diff)
downloadserd-ada2909ca27bd52be4a91d1d985661a0300cd77a.tar.gz
serd-ada2909ca27bd52be4a91d1d985661a0300cd77a.tar.bz2
serd-ada2909ca27bd52be4a91d1d985661a0300cd77a.zip
Factor out command wrapping for ARM emulator
Diffstat (limited to 'wscript')
-rw-r--r--wscript14
1 files changed, 9 insertions, 5 deletions
diff --git a/wscript b/wscript
index 3c7078c9..8431cbb2 100644
--- a/wscript
+++ b/wscript
@@ -400,6 +400,14 @@ def _test_output_syntax(test_class):
raise Exception('Unknown test class <%s>' % test_class)
+def _wrapped_command(cmd):
+ if Options.options.test_wrapper:
+ import shlex
+ return shlex.split(Options.options.test_wrapper) + cmd
+
+ return cmd
+
+
def _load_rdf(filename):
"Load an RDF file into python dictionaries via serdi. Only supports URIs."
import subprocess
@@ -409,11 +417,7 @@ def _load_rdf(filename):
model = {}
instances = {}
- cmd = ['./serdi_static', filename]
- if Options.options.test_wrapper:
- import shlex
- cmd = shlex.split(Options.options.test_wrapper) + cmd
-
+ cmd = _wrapped_command(['./serdi_static', filename])
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
for line in proc.communicate()[0].splitlines():
matches = re.match(r'<([^ ]*)> <([^ ]*)> <([^ ]*)> \.',