[PATCH] D34732: Clean temp directories before running lit

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 13:57:33 PDT 2017


Yeah, maybe cd'ing to %t would be sufficient (& then change the path to be
'.'). I see 'cd' is used in enough other tests that I guess it's fairly
portable/usable in tests.

On Thu, Jun 29, 2017 at 1:15 PM Zachary Turner <zturner at google.com> wrote:

> I don't even think you would need the rmdir or the mkdir, that's already
> handled by this patch.  All you would need to do is have the test cd at the
> beginning.  Since this is only for a single test, is that maybe a better
> approach?
>
> On Thu, Jun 29, 2017 at 12:46 PM Reid Kleckner <rnk at google.com> wrote:
>
>> On Thu, Jun 29, 2017 at 11:20 AM, David Blaikie <dblaikie at gmail.com>
>> wrote:
>>
>>> Any chance of trying to make the working directory be the child
>>> directory (output/foo instead of just output/)? That way those symbolize
>>> tests would be portable to different directories (as they were before since
>>> they just baked in the universal 'output' subdirectory, which isn't a thing
>>> anymore with this change)) and different directory layouts like this change
>>> in the future
>>>
>>
>> We could make the test resilient to these changes by doing `RUN: rm -rf
>> %t && mkdir -p %t/Output && cd %t/Output`
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170629/0b1f3320/attachment.html>


More information about the llvm-commits mailing list