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

Unified Diff: tools/dartium/multivm_archive.py

Issue 270663007: Refactor a copy of dartium/buildbot_annotated_steps.py (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More renaming and moving code. Created 6 years, 7 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
Index: tools/dartium/multivm_archive.py
diff --git a/tools/dartium/multivm_archive.py b/tools/dartium/multivm_archive.py
new file mode 100644
index 0000000000000000000000000000000000000000..d1f38de99019a5324442e10d9a2f7362db2e3286
--- /dev/null
+++ b/tools/dartium/multivm_archive.py
@@ -0,0 +1,45 @@
+#!/usr/bin/python
+
+# Copyright (c) 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Archive builds from the multivm and dartium perf builders
ricow1 2014/05/14 17:28:18 does this really get called for dartium perf build
Bill Hesse 2014/05/15 10:46:37 Yes, since the setup is identical for multivm and
+
+Archive dartium, content_shell, and chromedriver to the old cloud storage bucket
+gs://dartium-archive.
+"""
+
+import os
+import platform
+import re
+import subprocess
+import sys
+
+import upload_steps
+import utils
+
+SRC_PATH = os.path.dirname(
ricow1 2014/05/14 17:28:18 how about putting this in utils and using it here
Bill Hesse 2014/05/15 10:46:37 Done. But: The file utils.py contains only total
+ os.path.dirname(
+ os.path.dirname(
+ os.path.dirname(os.path.abspath(__file__)))))
+
+def main():
+ multivm_deps = os.path.join(os.path.dirname(SRC_PATH), 'multivm.deps')
+ revision_directory = (multivm_deps if (os.path.isdir(multivm_deps))
+ else os.path.join(SRC_PATH, 'dart'))
+ output, _ = subprocess.Popen(['svn', 'info'],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT,
+ shell=(platform.system == 'Windows'),
+ cwd = revision_directory).communicate()
+ revision = re.search('Last Changed Rev: (\d+)', output).group(1)
+ version = revision + '.0'
+ info = upload_steps.BuildInfo(version, revision)
+
+ # Archive to the revision bucket unless integration build
ricow1 2014/05/14 17:28:18 what does integration build mean here?
Bill Hesse 2014/05/15 10:46:37 Stray comment - fixed.
+ if info.is_build:
+ upload_steps.ArchiveAndUpload(info, archive_latest=False)
+
+if __name__ == '__main__':
+ sys.exit(main())

Powered by Google App Engine
This is Rietveld 408576698