Commit 0d7ce141 authored by Anna Kogan's avatar Anna Kogan

Cleaned code

parent 0334cf11
...@@ -21,14 +21,12 @@ if __name__ == "__main__": ...@@ -21,14 +21,12 @@ if __name__ == "__main__":
options.generateHtml = detectHtmlOutputType(options.format) options.generateHtml = detectHtmlOutputType(options.format)
# expand wildcards and filter duplicates
file = os.path.abspath(args[0]) file = os.path.abspath(args[0])
if not os.path.isfile(file): if not os.path.isfile(file):
sys.stderr.write("IOError reading \"" + file + "\" - " + str(err) + os.linesep) sys.stderr.write("IOError reading \"" + file + "\" - " + str(err) + os.linesep)
parser.print_help() parser.print_help()
exit(0) exit(0)
# read all passed files
test_sets = [] test_sets = []
try: try:
tests = testlog_parser.parseLogFile(file) tests = testlog_parser.parseLogFile(file)
...@@ -41,7 +39,7 @@ if __name__ == "__main__": ...@@ -41,7 +39,7 @@ if __name__ == "__main__":
if not test_sets: if not test_sets:
sys.stderr.write("Error: no test data found" + os.linesep) sys.stderr.write("Error: no test data found" + os.linesep)
quit() exit(0)
# find matches # find matches
setsCount = len(test_sets) setsCount = len(test_sets)
...@@ -84,6 +82,10 @@ if __name__ == "__main__": ...@@ -84,6 +82,10 @@ if __name__ == "__main__":
testsuits.append({'name': prevGroupName, 'time': suit_time, \ testsuits.append({'name': prevGroupName, 'time': suit_time, \
'failed': has_failed}) 'failed': has_failed})
if len(testsuits)==0:
print 'No testsuits found'
exit(0)
tbl = table() tbl = table()
# header # header
......
Markdown is supported
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