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

Unified Diff: scripts/slave/runtest.py

Issue 10834044: Script to archive profiling data collected from (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/build/
Patch Set: Created 8 years, 5 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 | « scripts/slave/chromium/archive_profiling_data.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/runtest.py
===================================================================
--- scripts/slave/runtest.py (revision 147800)
+++ scripts/slave/runtest.py (working copy)
@@ -36,6 +36,7 @@
# pylint checks.
# pylint: disable=E0611
# pylint: disable=E1101
+from buildbot.process.properties import WithProperties
cmp 2012/07/31 23:52:04 please remove this line, we won't need it
ramant (doing other things) 2012/08/01 00:23:31 Done.
from buildbot.status import builder
from common import chromium_utils
@@ -303,6 +304,40 @@
print '@@@STEP_TEXT@%s@@@' % desc
+def upload_profiling_data(options):
+ """Using the target build configuration, archive the profiling data to Google
+ Storage.
+ """
+ build_dir = os.path.normpath(os.path.abspath(options.build_dir))
+
+ # Profiling data is in /b/build/slave/SLAVE_NAME/build/src/chrome/test/data
+ profiling_data_dir = os.path.join(build_dir, 'src', 'chrome', 'test', 'data')
+ if not os.path.exists(profiling_data_dir):
+ return True
+
+ profiling_file = os.path.join(profiling_data_dir, 'task_profile.json')
+ if not os.path.exists(profiling_file):
+ return True
+
+ # Profiling tool is in
+ # /b/build/slave/SLAVE_NAME/build/src/build/scripts/slave/chromium
+ profiling_archive_tool = os.path.join(build_dir, 'src', 'build', 'scripts',
+ 'slave', 'chromium',
+ 'archive_profiling_data.py')
+
+ if sys.platform == 'win32':
+ python = 'python_slave'
+ else:
+ python = 'python'
+
+ cmd = [python,
+ profiling_archive_tool,
+ '--run-id', WithProperties('%(got_revision)s_%(buildername)s'),
cmp 2012/07/31 23:52:04 you can access these properties as: options.build_
ramant (doing other things) 2012/08/01 00:23:31 Done.
+ '--profiling-data-dir', profiling_data_dir]
+
+ return chromium_utils.RunCommand(cmd)
+
+
def main_mac(options, args):
if len(args) < 1:
raise chromium_utils.MissingArgument('Usage: %s' % USAGE)
@@ -703,6 +738,8 @@
sys.stderr.write('Unknown sys.platform value %s\n' % repr(sys.platform))
return 1
+ upload_profiling_data(options)
cmp 2012/07/31 23:52:04 this should be behind a conditional of some sort,
ramant (doing other things) 2012/08/01 00:23:31 Done.
+
new_temp_files = get_temp_count()
if temp_files > new_temp_files:
print >> sys.stderr, (
« no previous file with comments | « scripts/slave/chromium/archive_profiling_data.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698