Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Unified Diff: slave/skia_slave_scripts/check_for_regressions.py

Issue 196653010: Reads bench expectations from skia-autogen svn repo. (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: patch 1 to address comments. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « slave/skia_slave_scripts/build_step.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: slave/skia_slave_scripts/check_for_regressions.py
diff --git a/slave/skia_slave_scripts/check_for_regressions.py b/slave/skia_slave_scripts/check_for_regressions.py
index a1c75efc9ad44be1299b703be1228e67aaeeea48..9c6d8fd7c5a63561ddba617709305a21414a86f3 100644
--- a/slave/skia_slave_scripts/check_for_regressions.py
+++ b/slave/skia_slave_scripts/check_for_regressions.py
@@ -6,10 +6,13 @@
""" Check for regressions in bench data. """
from build_step import BuildStep
+from config_private import AUTOGEN_SVN_BASEURL
+from slave import slave_utils
from utils import shell_utils
import builder_name_schema
import os
+import subprocess
import sys
@@ -21,16 +24,29 @@ class CheckForRegressions(BuildStep):
**kwargs)
def _RunInternal(self, representation):
+ # Reads expectations from skia-autogen svn repo using 'svn cat'.
+ expectations_filename = ('bench_expectations_' +
+ builder_name_schema.GetWaterfallBot(self.builder_name) + '.txt')
+ url = '%s/%s/%s' % (AUTOGEN_SVN_BASEURL, 'bench', expectations_filename)
+
+ svn_binary = slave_utils.SubversionExe()
+ proc = subprocess.Popen([svn_binary, 'cat', url],
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ (stdout, stderr) = proc.communicate()
borenet 2014/03/14 12:06:46 Please use shell_utils.run() for this: try: out
benchen 2014/03/14 13:25:42 Done. Thanks for the suggestion. On 2014/03/14 12:
+ if proc.returncode is not 0:
+ print 'Skip due to missing expectations: %s' % url
+ return
+
path_to_check_bench_regressions = os.path.join('bench',
'check_bench_regressions.py')
- # TODO(borenet): We should move these expectations into expectations/bench.
+
+ # Writes the expectations from svn repo to the local file.
path_to_bench_expectations = os.path.join(
- 'bench',
- 'bench_expectations_%s.txt' % builder_name_schema.GetWaterfallBot(
- self._builder_name))
- if not os.path.isfile(path_to_bench_expectations):
- print 'Skip due to missing expectations: %s' % path_to_bench_expectations
- return
+ self._perf_range_input_dir, expectations_filename)
+ os.makedirs(self._perf_range_input_dir)
+ with open(path_to_bench_expectations, 'w') as file_handle:
+ file_handle.write(stdout)
+
cmd = ['python', path_to_check_bench_regressions,
'-a', representation,
'-b', self._builder_name,
« no previous file with comments | « slave/skia_slave_scripts/build_step.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698