aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_suite.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-07-08 18:46:38 +0200
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:08 -0500
commit66c589578eb9b9dc89da6a34d274627f7f2435d7 (patch)
tree79605f183d4b5b7687c43197ab58f0e067dc8927 /test/run_suite.py
parent155f5e2f24c24f5b5ffbf13fcea5cf1a355ec372 (diff)
downloadserd-66c589578eb9b9dc89da6a34d274627f7f2435d7.tar.gz
serd-66c589578eb9b9dc89da6a34d274627f7f2435d7.tar.bz2
serd-66c589578eb9b9dc89da6a34d274627f7f2435d7.zip
Add command-line option to write output to a file
Diffstat (limited to 'test/run_suite.py')
-rwxr-xr-xtest/run_suite.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/run_suite.py b/test/run_suite.py
index ffc616a3..cee9d88e 100755
--- a/test/run_suite.py
+++ b/test/run_suite.py
@@ -41,13 +41,12 @@ def run_eval_test(command, in_path, good_path, out_path):
"""Run a positive eval test and return whether the output matches."""
syntax = util.syntax_from_path(out_path)
- command = command + ["-o", syntax, in_path]
-
- with subprocess.Popen(command, stdout=PIPE, encoding="utf-8") as proc:
- out = list(proc.stdout)
+ command = command + ["-o", syntax, "-w", out_path, in_path]
+ subprocess.check_call(command, encoding="utf-8")
with open(good_path, "r", encoding="utf-8") as good:
- return util.lines_equal(list(good), out, good_path, out_path)
+ with open(out_path, "r", encoding="utf-8") as out:
+ return util.lines_equal(list(good), list(out), good_path, out_path)
def run_positive_test(command, in_path):