Commit ccab0dbe authored by Vincent Stehlé's avatar Vincent Stehlé
Browse files

Parser.py: strip lines



Strip .ekl input lines, to avoid capturing "\n" in the log field. Adapt
the empty lines skip test accordingly.
Signed-off-by: Vincent Stehlé's avatarVincent Stehlé <vincent.stehle@arm.com>
parent 02baa85b
...@@ -41,11 +41,18 @@ def ekl_parser (file): ...@@ -41,11 +41,18 @@ def ekl_parser (file):
current_sub_set = "N/A" current_sub_set = "N/A"
for line in file: for line in file:
# Strip the line from trailing whitespaces
line = line.rstrip()
# Skip empty line
if line == '':
continue
#strip the line of | & || used for sepration #strip the line of | & || used for sepration
split_line = [string for string in line.split('|') if string != ""] split_line = [string for string in line.split('|') if string != ""]
#TODO:I can skip TERM, but I feel like "\n" should be able to be handled in the above list comprehension # Skip TERM
if split_line[0]=="TERM" or split_line[0]=="\n": if split_line[0] == "TERM":
continue continue
#The "HEAD" tag is the only indcation we are on a new test set #The "HEAD" tag is the only indcation we are on a new test set
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment