mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-21 03:05:15 +00:00
Brian Gesiak
ff9a7b26d9
[lit] Fix TestRunner unit test on Windows
Summary: Normally Python converts all newline characters, Windows or Unix, to Unix newlines when opening a file. However, lit opens files in binary mode, which does not perform this conversion. As a result, trailing Windows newlines are not stripped from test input, which caused a failure in the TestRunner unit test: ``` FAIL: test_custom (__main__.TestIntegratedTestKeywordParser) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Users\bgesiak\src\llvm\llvm\utils\lit\tests\unit\TestRunner.py", line 109, in test_custom self.assertItemsEqual(value, ['a', 'b', 'c']) AssertionError: Element counts were not equal: First has 1, Second has 0: 'c\r' First has 0, Second has 1: 'c' ``` Fix the discrepancy in behavior across the two platforms by manually stripping Windows newlines before yielding each line in the test file. Reviewers: echristo, beanz, ddunbar, delcypher, rnk Reviewed By: rnk Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D27746 llvm-svn: 309312
…
Low Level Virtual Machine (LLVM) ================================ This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments. LLVM is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt. Please see the documentation provided in docs/ for further assistance with LLVM, and in particular docs/GettingStarted.rst for getting started with LLVM and docs/README.txt for an overview of LLVM's documentation setup. If you are writing a package for LLVM, see docs/Packaging.rst for our suggestions.
Description
Languages
C++
96.9%
C
1%
Python
1%
CMake
0.6%
OCaml
0.2%
Other
0.1%