[llvm] r210597 - lit: warn when passed invalid pathname

Hans Wennborg hans at chromium.org
Mon Jun 16 13:27:11 PDT 2014


On Mon, Jun 16, 2014 at 11:20 AM, Daniel Dunbar <daniel at zuster.org> wrote:
> Sorry, I should have caught that in review.
>
> Adam is right, the reason why this code didn't do this previously is because
> of the "virtual test discovery" mechanism that lets you name tests inside
> the "test exec root".
>
> Hans, I think it is probably necessary to put this patch later, after the
> actual discovery is done.

Sorry for the breakage. I've reverted my patch in r211048 until I can
figure out a better way to do this.

Thanks,
Hans


> On Mon, Jun 16, 2014 at 11:18 AM, Adam Nemet <anemet at apple.com> wrote:
>>
>> Hi Hans,
>>
>> How do you run individual tests after this patch?  I used to be able to
>> this:
>>
>> /org/llvm/build/test$ /usr/bin/python ../../utils/lit/lit.py -v
>> MC/X86/avx512-encodings.s
>> -- Testing: 1 tests, 1 threads --
>> PASS: LLVM :: MC/X86/avx512-encodings.s (1 of 1)
>> Testing Time: 0.03s
>>   Expected Passes    : 1
>>
>>
>> Whereas now I get:
>>
>> /org/llvm/build/test$ /usr/bin/python ../../utils/lit/lit.py -v
>> MC/X86/avx512-encodings.s
>> lit.py: discovery.py:215: warning: no such file or directory:
>> 'MC/X86/avx512-encodings.s'
>> -- Testing: 0 tests, 0 threads --
>> Testing Time: 0.01s
>>
>> 1 warning(s) in tests.
>>
>> It looks like that the reason is this:
>>
>> On Jun 10, 2014, at 3:51 PM, Hans Wennborg <hans at hanshq.net> wrote:
>>
>> Modified: llvm/trunk/utils/lit/lit/discovery.py
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/discovery.py?rev=210597&r1=210596&r2=210597&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/utils/lit/lit/discovery.py (original)
>> +++ llvm/trunk/utils/lit/lit/discovery.py Tue Jun 10 17:51:58 2014
>> @@ -200,9 +200,7 @@ def find_tests_for_inputs(lit_config, in
>>     # Expand '@...' form in inputs.
>>     actual_inputs = []
>>     for input in inputs:
>> -        if os.path.exists(input) or not input.startswith('@'):
>> -            actual_inputs.append(input)
>> -        else:
>>
>>
>> This used to allow the test even if the file didn’t exist under build/test
>> which is usually not the case.
>>
>> +        if input.startswith('@'):
>>             f = open(input[1:])
>>             try:
>>                 for ln in f:
>> @@ -211,6 +209,10 @@ def find_tests_for_inputs(lit_config, in
>>                         actual_inputs.append(ln)
>>             finally:
>>                 f.close()
>> +        elif os.path.exists(input):
>> +            actual_inputs.append(input)
>> +        else:
>> +            lit_config.warning('no such file or directory: %r' % input)
>>
>>
>> But now we fail in that case.
>>
>> Adam
>>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>




More information about the llvm-commits mailing list