[llvm] r220354 - Fix ShTest parsing error when a keyword line doesn't end with a newline.
Daniel Dunbar
daniel at zuster.org
Tue Oct 21 17:34:31 PDT 2014
Author: ddunbar
Date: Tue Oct 21 19:34:31 2014
New Revision: 220354
URL: http://llvm.org/viewvc/llvm-project?rev=220354&view=rev
Log:
Fix ShTest parsing error when a keyword line doesn't end with a newline.
Modified:
llvm/trunk/utils/lit/lit/TestRunner.py
Modified: llvm/trunk/utils/lit/lit/TestRunner.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestRunner.py?rev=220354&r1=220353&r2=220354&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/TestRunner.py (original)
+++ llvm/trunk/utils/lit/lit/TestRunner.py Tue Oct 21 19:34:31 2014
@@ -343,6 +343,10 @@ def parseIntegratedTestScriptCommands(so
# 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
More information about the llvm-commits
mailing list