From: Mark Wooding Date: Mon, 27 Nov 2017 02:03:52 +0000 (+0000) Subject: tests/dtest.py: Maintain a separate test root for each test. X-Git-Tag: 5.2~54 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/commitdiff_plain/3dd7ec41f4067b35740aba970b6405dbd3113f8f tests/dtest.py: Maintain a separate test root for each test. Now they can run in parallel without breaking each other, which is nice. It's nice for two reasons: firstly, Automake changed behaviour and runs tests in parallel by default nowadays; and secondly, the tests are rather slow because they involve a bunch of waiting around for things, and waiting for stuff in parallel is easy. The downside is that we end up gobbling a lot of disk space with all of the logfiles. I think this is a good trade. --- diff --git a/tests/dtest.py b/tests/dtest.py index a8ea64c..6f9e6a8 100644 --- a/tests/dtest.py +++ b/tests/dtest.py @@ -198,7 +198,7 @@ mail_sender no.such.user.sorry@greenend.org.uk def common_setup(): remove_dir(testroot) - os.mkdir(testroot) + os.makedirs(testroot) # Choose a port global port port = random.randint(49152, 65530) @@ -410,5 +410,6 @@ def command(args): tests = 0 failures = 0 daemon = None -testroot = "%s/tests/testroot" % top_builddir +testroot = "%s/tests/testroot/%s" % \ + (top_builddir, os.path.basename(sys.argv[0])) tracks = "%s/tracks" % testroot