-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# Preliminary error parsing script | ||
|
||
import sys | ||
|
||
from valparse import Parser | ||
|
||
if len(sys.argv) != 2: | ||
print("Usage: ./fail.py <xml_file>") | ||
sys.exit(1) | ||
|
||
filename = sys.argv[1] | ||
valfile = Parser(filename) | ||
|
||
if valfile.signal: | ||
print(f"Fatal signal observed: {valfile.signal.signame}") | ||
print("Do not award memory points if SIGABRT or SIGSEGV") | ||
sys.exit() | ||
|
||
if valfile.errcount: | ||
print(f"{valfile.errcount} errors observed, do not award error points") | ||
else: | ||
print("No errors observed.") | ||
|
||
if valfile.leakcount: | ||
print(f"f{valfile.leakcount} leaks observed, do not award leak points") | ||
else: | ||
print("No leaks observed.") |
Empty file.