diff options
author | David Robillard <d@drobilla.net> | 2022-07-15 17:38:01 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-07-16 09:33:03 -0400 |
commit | 8a2482ad1b5b4f915d62c47caa2f225b475ba43a (patch) | |
tree | 1647a0c9b4dc7f180755ac7b067fab59a1dbc70b /test | |
parent | 51326d59fc1054b2a1c33467130cae7e159f0983 (diff) | |
download | serd-8a2482ad1b5b4f915d62c47caa2f225b475ba43a.tar.gz serd-8a2482ad1b5b4f915d62c47caa2f225b475ba43a.tar.bz2 serd-8a2482ad1b5b4f915d62c47caa2f225b475ba43a.zip |
Write test outputs to a temporary directory
While occasionally useful, I almost always end up reproducing the issue live to
investigate something anyway. Not keeping the many tests results around
results in less clutter, and hopefully makes the test suites faster in
environments with bad I/O like Docker.
Diffstat (limited to 'test')
-rwxr-xr-x | test/run_test_suite.py | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/test/run_test_suite.py b/test/run_test_suite.py index 3e4f9c6b..c2730dc4 100755 --- a/test/run_test_suite.py +++ b/test/run_test_suite.py @@ -209,6 +209,7 @@ def test_suite( report_filename, input_syntax, command_prefix, + out_test_dir, ): """Run all tests in a test suite manifest.""" @@ -216,11 +217,6 @@ def test_suite( test_dir = os.path.dirname(manifest_path) model, instances = _load_rdf(manifest_path, base_uri, command_prefix) - top_dir = os.path.commonpath([os.getcwd(), os.path.abspath(test_dir)]) - out_test_dir = os.path.relpath(test_dir, top_dir) - - os.makedirs(out_test_dir, exist_ok=True) - asserter = "" if os.getenv("USER") == "drobilla": asserter = "http://drobilla.net/drobilla#me" @@ -383,13 +379,15 @@ def main(): shlex.split(args.wrapper) + [args.serdi] + args.serdi_option ) - return test_suite( - args.manifest, - args.base_uri, - args.report, - args.syntax, - command_prefix, - ) + with tempfile.TemporaryDirectory() as test_out_dir: + return test_suite( + args.manifest, + args.base_uri, + args.report, + args.syntax, + command_prefix, + test_out_dir, + ) if __name__ == "__main__": |