[Ezbench-dev] [PATCH 16/25] report: use the new runner

Petri Latvala petri.latvala at intel.com
Fri Feb 24 11:19:17 UTC 2017


From: Martin Peres <martin.peres at linux.intel.com>

---
 python-modules/ezbench/report.py | 16 ++++++++--------
 stats/compare_reports.py         |  2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/python-modules/ezbench/report.py b/python-modules/ezbench/report.py
index 6af9b19..9e97b57 100644
--- a/python-modules/ezbench/report.py
+++ b/python-modules/ezbench/report.py
@@ -968,11 +968,11 @@ class Commit:
             pass
 
         # Look for the exit code
-        self.compil_exit_code = EzbenchExitCode.UNKNOWN
+        self.compil_exit_code = RunnerErrorCode.UNKNOWN
         if report.journal.deployed_count(self.full_sha1) > 0:
-            self.compil_exit_code = EzbenchExitCode.NO_ERROR
+            self.compil_exit_code = RunnerErrorCode.NO_ERROR
         elif report.journal.deploy_count(self.full_sha1) > 1:
-            self.compil_exit_code = EzbenchExitCode.DEPLOYMENT_ERROR
+            self.compil_exit_code = RunnerErrorCode.DEPLOYMENT_ERROR
         else:
             # Last resort, try to inspect the compilation logs
             try:
@@ -982,14 +982,14 @@ class Commit:
                     # Line contains the last line of the report, parse it
                     s = "Exiting with error code "
                     if line.startswith(s):
-                        self.compil_exit_code = EzbenchExitCode(int(line[len(s):]))
+                        self.compil_exit_code = RunnerErrorCode(int(line[len(s):]))
             except Exception:
                 self.compile_log = None
                 pass
 
     def build_broken(self):
-        return (self.compil_exit_code.value >= EzbenchExitCode.COMP_DEP_UNK_ERROR.value and
-                self.compil_exit_code.value <= EzbenchExitCode.DEPLOYMENT_ERROR.value)
+        return (self.compil_exit_code.value >= RunnerErrorCode.COMP_DEP_UNK_ERROR.value and
+                self.compil_exit_code.value <= RunnerErrorCode.DEPLOYMENT_ERROR.value)
 
     def geom_mean(self):
         """ Returns the geometric mean of the average performance of all the
@@ -1579,7 +1579,7 @@ class Report:
 
                         # Add the result to the commit's results
                         commit.results[test.full_name] = result
-                        commit.compil_exit_code = EzbenchExitCode.NO_ERROR # The deployment must have been successful if there is data
+                        commit.compil_exit_code = RunnerErrorCode.NO_ERROR # The deployment must have been successful if there is data
                     except Exception as e:
                         traceback.print_exc(file=sys.stderr)
                         sys.stderr.write("\n")
@@ -1587,7 +1587,7 @@ class Report:
 
             # Add the information about the runtime and the commit to the list of commits
             # INFO: Do not add the commit if we got no meaningful results for it
-            if len(commit.results) > 0 or commit.compil_exit_code != EzbenchExitCode.UNKNOWN:
+            if len(commit.results) > 0 or commit.compil_exit_code != RunnerErrorCode.UNKNOWN:
                 result = TestResult(commit, ezbench_runner, "commit_result", None, None, None)
                 commit.results[result.test.full_name] = result
                 self.commits.append(commit)
diff --git a/stats/compare_reports.py b/stats/compare_reports.py
index c3828f4..7ac4c6b 100755
--- a/stats/compare_reports.py
+++ b/stats/compare_reports.py
@@ -172,7 +172,7 @@ def reports_to_html(reports, output, output_unit = None, title = None,
 					db["commits"][commit.label]['build_color'] = "#00FF00"
 				else:
 					db["commits"][commit.label]['build_color'] = "#FF0000"
-				db["commits"][commit.label]['build_error'] = str(EzbenchExitCode(commit.compil_exit_code)).split('.')[1]
+				db["commits"][commit.label]['build_error'] = str(RunnerErrorCode(commit.compil_exit_code)).split('.')[1]
 			db["commits"][commit.label]['reports'][report.name] = dict()
 
 			# Add the results and perform some stats
-- 
2.9.3



More information about the Ezbench-dev mailing list