[PATCH] tests: create test directories under /tmp/kallithea_tests rather than /tmp

Mads Kiilerich mads at kiilerich.com
Sun May 10 19:09:32 EDT 2015


On 05/10/2015 08:23 PM, Thomas De Schampheleire wrote:
> # HG changeset patch
> # User Thomas De Schampheleire <thomas.de.schampheleire at gmail.com>
> # Date 1431280346 -7200
> #      Sun May 10 19:52:26 2015 +0200
> # Node ID b4524d737ef6d0d22526075b113ebfe333a44271
> # Parent  98c06fc800ed0f0635f3aa189177027b3f8e6c1f
> tests: create test directories under /tmp/kallithea_tests rather than /tmp
>
> Do not pollute /tmp with tens of test directories.
>
> diff --git a/kallithea/tests/__init__.py b/kallithea/tests/__init__.py
> --- a/kallithea/tests/__init__.py
> +++ b/kallithea/tests/__init__.py
> @@ -85,7 +85,7 @@ environ = {}
>   
>   #SOME GLOBALS FOR TESTS
>   
> -TESTS_TMP_PATH = jn('/', 'tmp', 'rc_test_%s' % _RandomNameSequence().next())
> +TESTS_TMP_PATH = jn('/', 'tmp', 'kallithea_tests', 'rc_test_%s' % _RandomNameSequence().next())

That would do that different users can't run the tests on the same 
machine. We should probably add the uid to the tmp name, as in 
/tmp/kallithea_tests.1000/... .

(For weird reasons I feel like I would prefer to use '-' instead of '_' 
... I don't know why or if it is relevant.)

IIRC, this is not enough to move _all_ output?

Also, the real solution is to clean up, right? This is just a 
workaround? Might be worth mentioning in the commit message.

/Mads



More information about the kallithea-general mailing list