diff options
author | Martin Peres <martin.peres@linux.intel.com> | 2015-10-06 16:13:12 +0300 |
---|---|---|
committer | Martin Peres <martin.peres@linux.intel.com> | 2015-10-06 16:13:12 +0300 |
commit | fc9f19c47a91d7c8e9a72e1b8281343730c9653f (patch) | |
tree | 6f2bf7a387f1d6fa0ab7df72b66dcb0d6eff22d8 | |
parent | b700303311ed1a7e39b25f04153aea5a162a7214 (diff) |
ezbench.py: honour the silent mode when generating reports
-rw-r--r-- | utils/ezbench.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/utils/ezbench.py b/utils/ezbench.py index f025bf9..d3130c8 100644 --- a/utils/ezbench.py +++ b/utils/ezbench.py @@ -214,6 +214,7 @@ def genPerformanceReport(log_folder, wantFrametime = False, silentMode = False): benchmarks = [] commits = [] labels = dict() + notes = [] # Save the current working directory and switch to the log folder cwd = os.getcwd() @@ -227,16 +228,18 @@ def genPerformanceReport(log_folder, wantFrametime = False, silentMode = False): finally: f.close() except IOError: - sys.stderr.write("The log folder '{0}' does not contain a commit_list file\n".format(log_folder)) - return (commits, benchmarks) + if not silentMode: + sys.stderr.write("The log folder '{0}' does not contain a commit_list file\n".format(log_folder)) + return Report(benchmarks, commits, notes) # Read all the commits' labels labels = readCommitLabels() # Check that there are commits if (len(commitsLines) == 0): - sys.stderr.write("The commit_list file is empty\n") - sys.exit(2) + if not silentMode: + sys.stderr.write("The commit_list file is empty\n") + return Report(benchmarks, commits, notes) # Gather all the information from the commits and generate the images if not silentMode: |