diff options
author | Daniel Dunbar <daniel@zuster.org> | 2014-10-22 00:34:31 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2014-10-22 00:34:31 +0000 |
commit | dfbb5c1b76b8cf1366bc795925c783805126cc29 (patch) | |
tree | aee1f5604597b4c8ab3334071f4ccaf0e4310711 /llvm/utils/lit | |
parent | 8226ca29e20060d4ddd8a3d8879a09553c2bc83e (diff) | |
download | bcm5719-llvm-dfbb5c1b76b8cf1366bc795925c783805126cc29.tar.gz bcm5719-llvm-dfbb5c1b76b8cf1366bc795925c783805126cc29.zip |
Fix ShTest parsing error when a keyword line doesn't end with a newline.
llvm-svn: 220354
Diffstat (limited to 'llvm/utils/lit')
-rw-r--r-- | llvm/utils/lit/lit/TestRunner.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/utils/lit/lit/TestRunner.py b/llvm/utils/lit/lit/TestRunner.py index ca87b054fa8..f280d3fd1db 100644 --- a/llvm/utils/lit/lit/TestRunner.py +++ b/llvm/utils/lit/lit/TestRunner.py @@ -343,6 +343,10 @@ def parseIntegratedTestScriptCommands(source_path): # Read the entire file contents. data = f.read() + # Ensure the data ends with a newline. + if not data.endswith('\n'): + data = data + '\n' + # Iterate over the matches. line_number = 1 last_match_position = 0 |