From 0d7ce141aad0d5c908d077f29e69f74dd7fac863 Mon Sep 17 00:00:00 2001 From: Anna Kogan Date: Thu, 10 Jan 2013 13:18:26 +0400 Subject: [PATCH] Cleaned code --- modules/ts/misc/perf_tests_timing.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/ts/misc/perf_tests_timing.py b/modules/ts/misc/perf_tests_timing.py index bf9d06c3ca..4a9f39af7f 100644 --- a/modules/ts/misc/perf_tests_timing.py +++ b/modules/ts/misc/perf_tests_timing.py @@ -21,14 +21,12 @@ if __name__ == "__main__": options.generateHtml = detectHtmlOutputType(options.format) - # expand wildcards and filter duplicates file = os.path.abspath(args[0]) if not os.path.isfile(file): sys.stderr.write("IOError reading \"" + file + "\" - " + str(err) + os.linesep) parser.print_help() exit(0) - # read all passed files test_sets = [] try: tests = testlog_parser.parseLogFile(file) @@ -41,7 +39,7 @@ if __name__ == "__main__": if not test_sets: sys.stderr.write("Error: no test data found" + os.linesep) - quit() + exit(0) # find matches setsCount = len(test_sets) @@ -84,6 +82,10 @@ if __name__ == "__main__": testsuits.append({'name': prevGroupName, 'time': suit_time, \ 'failed': has_failed}) + if len(testsuits)==0: + print 'No testsuits found' + exit(0) + tbl = table() # header