aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_test_suite.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-08-12 13:12:42 -0400
committerDavid Robillard <d@drobilla.net>2022-01-28 21:57:07 -0500
commit90828959c762b0e6d2c318032e714ca39e8e6edb (patch)
tree415a9e4e5bc2b44b986979a31261c611479f9955 /test/run_test_suite.py
parent970dfc33de59a50b24f1e185495282e8b9a63885 (diff)
downloadserd-90828959c762b0e6d2c318032e714ca39e8e6edb.tar.gz
serd-90828959c762b0e6d2c318032e714ca39e8e6edb.tar.bz2
serd-90828959c762b0e6d2c318032e714ca39e8e6edb.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/run_test_suite.py')
-rwxr-xr-xtest/run_test_suite.py30
1 files changed, 11 insertions, 19 deletions
diff --git a/test/run_test_suite.py b/test/run_test_suite.py
index 81d36bc1..13bb3c7d 100755
--- a/test/run_test_suite.py
+++ b/test/run_test_suite.py
@@ -211,8 +211,6 @@ def test_suite(
command_prefix + ["-I", base_uri], manifest_path
)
- os.makedirs(out_test_dir, exist_ok=True)
-
asserter = ""
if os.getenv("USER") == "drobilla":
asserter = "http://drobilla.net/drobilla#me"
@@ -396,11 +394,6 @@ def main():
parser.add_argument("--syntax", default=None, help="input syntax")
parser.add_argument("--osyntax", default=None, help="output syntax")
parser.add_argument("--wrapper", default="", help="executable wrapper")
-
- parser.add_argument(
- "-o", "--out-dir", default=None, help="output directory"
- )
-
parser.add_argument("manifest", help="test suite manifest.ttl file")
parser.add_argument("base_uri", help="base URI for tests")
@@ -409,22 +402,21 @@ def main():
)
args = parser.parse_args(sys.argv[1:])
- if args.out_dir is None:
- suite_name = os.path.basename(os.path.dirname(args.manifest))
- args.out_dir = os.path.join('test', suite_name)
+
command_prefix = (
shlex.split(args.wrapper) + [args.serdi] + args.serdi_option
)
- return test_suite(
- args.manifest,
- args.base_uri,
- args.report,
- args.syntax,
- args.osyntax,
- command_prefix,
- args.out_dir,
- )
+ with tempfile.TemporaryDirectory() as test_out_dir:
+ return test_suite(
+ args.manifest,
+ args.base_uri,
+ args.report,
+ args.syntax,
+ args.osyntax,
+ command_prefix,
+ test_out_dir,
+ )
if __name__ == "__main__":