[test-suite] r291933 - litsupport: Add compatibility cludge so it still works with the pypy version of lit

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 20 11:29:06 PST 2017


Whatever happens when you "pip install lit" I guess that is pypi :)

> On Jan 20, 2017, at 11:28 AM, Chris Matthews via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> Pypy (the jit) or pypi (the package index)?
> 
> 
> On January 13, 2017 at 10:47:27 AM, Matthias Braun via llvm-commits (llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>) wrote:
> 
>> Author: matze
>> Date: Fri Jan 13 12:36:20 2017
>> New Revision: 291933
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=291933&view=rev
>> Log:
>> litsupport: Add compatibility cludge so it still works with the pypy version of lit
>> 
>> Modified:
>> test-suite/trunk/litsupport/testfile.py
>> 
>> Modified: test-suite/trunk/litsupport/testfile.py
>> URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/litsupport/testfile.py?rev=291933&r1=291932&r2=291933&view=diff
>> ==============================================================================
>> --- test-suite/trunk/litsupport/testfile.py (original)
>> +++ test-suite/trunk/litsupport/testfile.py Fri Jan 13 12:36:20 2017
>> @@ -27,16 +27,19 @@ def parse(context, filename):
>> runscript = []
>> verifyscript = []
>> metricscripts = {}
>> - keywords = ['PREPARE:', 'RUN:', 'VERIFY:', 'METRIC:']
>> + # Note that we keep both "RUN" and "RUN:" in the list to stay compatible
>> + # with older lit versions.
>> + keywords = ['PREPARE:', 'PREPARE', 'RUN:', 'RUN', 'VERIFY:', 'VERIFY',
>> + 'METRIC:', 'METRIC']
>> for line_number, command_type, ln in \
>> parseIntegratedTestScriptCommands(filename, keywords):
>> - if command_type == 'PREPARE:':
>> + if command_type.startswith('PREPARE'):
>> _parseShellCommand(preparescript, ln)
>> - elif command_type == 'RUN:':
>> + elif command_type.startswith('RUN'):
>> _parseShellCommand(runscript, ln)
>> - elif command_type == 'VERIFY:':
>> + elif command_type.startswith('VERIFY'):
>> _parseShellCommand(verifyscript, ln)
>> - elif command_type == 'METRIC:':
>> + elif command_type.startswith('METRIC'):
>> metric, ln = ln.split(':', 1)
>> metricscript = metricscripts.setdefault(metric.strip(), list())
>> _parseShellCommand(metricscript, ln)
>> 
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170120/1a8f518a/attachment.html>


More information about the llvm-commits mailing list