Skip to content

Commit 2c47c5e

Browse files
committed
Return with error
1 parent 5b1fcef commit 2c47c5e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/grammar/testparser.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,12 @@
6969

7070
for parser in args.parser:
7171
filename = os.path.basename(parser) + '.bad'
72-
print("writing {} files that did not yield the correct result with {} to {}".format(len(bad[parser]), parser, filename))
72+
bad_tests = len(bad[parser])
73+
print("writing {} files that did not yield the correct result with {} to {}\n".format(bad_tests, parser, filename))
7374
with open(filename, "w") as f:
7475
for p in bad[parser]:
76+
print("bad test: {}".format(p))
7577
f.write(p)
7678
f.write("\n")
79+
if bad_tests > 0:
80+
exit(1)

0 commit comments

Comments
 (0)