Skip to content

Commit d6ff6c0

Browse files
committed
tests
1 parent d589b05 commit d6ff6c0

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

run-tests.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,15 @@ def cleanup(out):
9393
clang_cmd.extend(cmd.split(' '))
9494
p = subprocess.Popen(clang_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
9595
comm = p.communicate()
96-
clang_output = cleanup(comm[0])
96+
clang_output = comm[0]
97+
clang_output_c = cleanup(comm[0])
9798

9899
gcc_cmd = ['gcc']
99100
gcc_cmd.extend(cmd.split(' '))
100101
p = subprocess.Popen(gcc_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
101102
comm = p.communicate()
102-
gcc_output = cleanup(comm[0])
103+
gcc_output = comm[0]
104+
gcc_output_c = cleanup(comm[0])
103105

104106
simplecpp_cmd = ['./simplecpp']
105107
# -E is not supported and we bail out on unknown options
@@ -110,17 +112,19 @@ def cleanup(out):
110112
simplecpp_output = cleanup(comm[0])
111113
simplecpp_err = comm[0].decode('utf-8').strip()
112114

113-
if simplecpp_output != clang_output and simplecpp_output != gcc_output:
115+
if simplecpp_output != clang_output_c and simplecpp_output != gcc_output_c:
114116
filename = cmd[cmd.rfind('/')+1:]
115117
if filename in todo:
116118
print('TODO ' + cmd)
117119
usedTodos.append(filename)
118120
else:
119121
print('FAILED ' + cmd)
120-
print('expected:')
121-
print(clang_output)
122-
print('actual:')
122+
print('---expected:')
123+
print(clang_output_c)
124+
print('---actual:')
123125
print(simplecpp_output)
126+
print('---original:')
127+
print(clang_output)
124128
if simplecpp_ec:
125129
print('simplecpp failed - ' + simplecpp_err)
126130
numberOfFailed = numberOfFailed + 1

0 commit comments

Comments
 (0)