Parallel execution of unittests

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Thu May 1 10:43:09 PDT 2014


On Thu, 01 May 2014 13:25:00 -0400, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> On 5/1/14, 10:09 AM, Steven Schveighoffer wrote:
>> On Thu, 01 May 2014 12:07:19 -0400, Dicebot <public at dicebot.lv> wrote:
>>
>>> On Thursday, 1 May 2014 at 15:37:21 UTC, Andrei Alexandrescu wrote:
>>>> On 5/1/14, 8:04 AM, Dicebot wrote:
>>>>> On Thursday, 1 May 2014 at 14:55:50 UTC, Andrei Alexandrescu wrote:
>>>>>> On 5/1/14, 1:34 AM, Dicebot wrote:
>>>>>>> I have just recently went through some of out internal projects
>>>>>>> removing
>>>>>>> all accidental I/O tests for the very reason that /tmp was full
>>>>>>
>>>>>> Well a bunch of stuff will not work on a full /tmp. Sorry, hard to
>>>>>> elicit empathy with a full /tmp :o). -- Andrei
>>>>>
>>>>> So you are OK with your unit tests failing randomly with no clear
>>>>> diagnostics?
>>>>
>>>> I'm OK with my unit tests failing on a machine with a full /tmp. The
>>>> machine needs fixing. -- Andrei
>>>
>>> It got full because of tests (surprise!). Your actions?
>>
>> It would be nice to have a uniform mechanism to get a unique
>> system-dependent file location for each specific unit test.
>>
>> The file should automatically delete itself at the end of the test.
>
> Looks like /tmp (%TEMP% or C:\TEMP in Windows) in conjunction with the  
> likes of mkstemp is what you're looking for :o).

No, I'm looking for unittest_getTempFile(Line = __LINE__, File =  
__FILE__)(), which handles all the magic of opening a temporary file,  
allowing me to use it for the unit test, and then closing and deleting it  
at the end, when the test passes.

-Steve


More information about the Digitalmars-d mailing list