forked from OSchip/llvm-project
0a466fc209
(Take 2: this patch re-applies r306625, which was reverted in r306629. This patch includes only trivial fixes.) In Python2 and Python3, the various (non-)?Unicode string types are sort of spaghetti. Python2 has unicode support tacked on via the 'unicode' type, which is distinct from 'str' (which are bytes). Python3 takes the "unicode-everywhere" approach, with 'str' representing a Unicode string. Both have a 'bytes' type. In Python3, it is the only way to represent raw bytes. However, in Python2, 'bytes' is an alias for 'str'. This leads to interesting problems when an interface requires a precise type, but has to run under both Python2 and Python3. The previous logic appeared to be correct in all cases, but went through more layers of indirection than necessary. This change does the necessary conversions in one shot, with documentation about which paths might be taken in Python2 or Python3. Changes from r306625: some tests just print binary outputs, so in those cases, fall back to str() in Python3. For googletests, add one missing call to to_string(). (Tested by verifying the visible breakage with Python3. Verified that everything works in py2 and py3.) llvm-svn: 306643 |
||
---|---|---|
.. | ||
examples | ||
lit | ||
tests | ||
utils | ||
MANIFEST.in | ||
README.txt | ||
lit.py | ||
setup.py |
README.txt
=============================== lit - A Software Testing Tool =============================== lit is a portable tool for executing LLVM and Clang style test suites, summarizing their results, and providing indication of failures. lit is designed to be a lightweight testing tool with as simple a user interface as possible. ===================== Contributing to lit ===================== Please browse the Test Suite > lit category in LLVM's Bugzilla for ideas on what to work on. Before submitting patches, run the test suite to ensure nothing has regressed: # From within your LLVM source directory. utils/lit/lit.py \ --path /path/to/your/llvm/build/bin \ utils/lit/tests Note that lit's tests depend on 'not' and 'FileCheck', LLVM utilities. You will need to have built LLVM tools in order to run lit's test suite successfully. You'll also want to confirm that lit continues to work when testing LLVM. Follow the instructions in http://llvm.org/docs/TestingGuide.html to run the regression test suite: make check-llvm And be sure to run the llvm-lit wrapper script as well: /path/to/your/llvm/build/bin/llvm-lit utils/lit/tests Finally, make sure lit works when installed via setuptools: python utils/lit/setup.py install lit --path /path/to/your/llvm/build/bin utils/lit/tests