1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/utils
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
2017-07-27 19:27:10 +00:00
..
bugpoint
count
crosstool
docker NFC. Fixed typos in the comments. 2017-07-24 16:02:29 +00:00
emacs
FileCheck [FileCheck] Don't scan past the closing CHECK-DAG for CHECK-NOT inside CHECK-DAG 2017-06-07 12:06:45 +00:00
fpcmp
gdb-scripts Make the Twine pretty-printer work with GDB 7.11 2017-06-04 03:27:12 +00:00
git
git-svn Revert r305598, "utils: Add a git-r utility for mapping svn revisions to git revisions in the monorepo." 2017-06-19 20:43:09 +00:00
jedit
kate
KillTheDoctor
lint
lit [lit] Fix TestRunner unit test on Windows 2017-07-27 19:27:10 +00:00
llvm-build
llvm-lit
LLVMVisualizers
Misc
not
PerfectShuffle
release test-release.sh: Fix phase2 and phase3 binary comparision 2017-07-24 19:28:30 +00:00
sanitizers
TableGen [globalisel][tablegen] Ensure MatchTable's are compile-time constants with constexpr. NFC. 2017-07-27 12:47:31 +00:00
Target/ARM
testgen
textmate
unittest Note addition of NetBSD support in googletest 2017-05-06 02:45:42 +00:00
valgrind
vim [AArch64] Extend CallingConv::X86_64_Win64 to AArch64 as well 2017-07-17 20:05:19 +00:00
vscode Adding VSCode syntax colorizer to utils (generated from textmate colorizer). 2017-05-09 17:13:37 +00:00
yaml-bench
abtest.py AsmPrinter: mark the beginning and the end of a function in verbose mode 2017-05-23 21:22:16 +00:00
bisect
bisect-skip-count Fix bug in bisect-skip-count not using passed-in arguments 2017-03-04 03:23:41 +00:00
check-each-file
clang-parse-diagnostics-file
codegen-diff
countloc.sh
create_ladder_graph.py
DSAclean.py
DSAextract.py
extract_symbols.py
findmisopt
findoptdiff
findsym.pl
GenLibDeps.pl
GetRepositoryPath
GetSourceVersion
getsrcs.sh
lldbDataFormatters.py
llvm-compilers-check
llvm-native-gxx
llvm.grm
LLVMBuild.txt
llvmdo
llvmgrep
makellvm
prepare-code-coverage-artifact.py [utils] coverage: Add help text about the --restrict flag (NFC) 2017-02-09 19:37:18 +00:00
schedcover.py
shuffle_fuzz.py
sort_includes.py
test_debuginfo.pl
update_llc_test_checks.py [PPC] Add generated tests for all atomic operations 2017-03-23 16:02:47 +00:00
update_test_checks.py [utils] remove ability to generate llc check lines from update_test_checks.py 2017-06-12 17:44:30 +00:00
UpdateCMakeLists.pl
wciia.py