[PATCH 1 of 2] run-tests: make --tmpdir option more useful

Martin Geisler mg at lazybytes.net
Thu Jul 23 07:26:51 CDT 2009


Augie Fackler <durin42 at gmail.com> writes:

> On Jul 23, 2009, at 7:18 AM, Martin Geisler wrote:
>
>> Do you still think this patch is bad? After Greg's patch things
>> should work like this (I didn't actually test it, I just read the
>> code):
>>
>> * no options: create temporary files in /tmp or as specified by TMP.
>>  Delete them automatically.
>>
>> * --tmpdir DIR: create temporary files in DIR. Do not delete them
>>  automatically.
>
> Yes - that's how I've understood it all along, and that's the behavior
> I'm arguing against. The reason I'm arguing against it is because I
> *always* move the test tmpdir (to a RAM disk), and to date have never
> wanted to keep the contents.

Right -- I believe you want the first bullet with no explicit options to
run-tests.py. Instead you implicitly move the tmpdir to your ramdisk by
exporting the TMP environment variable (tempfile.mkdtemp will use it).

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.


More information about the Mercurial-devel mailing list