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

Unified Diff: tools/bots/fetch_reference_build.py

Issue 169183004: Move Dartium reference build scripts to dartium_tools/perf (Closed) Base URL: svn://svn.chromium.org/chrome/branches/dart/1750/src
Patch Set: Move files to dart/tools/bots instead. Created 6 years, 10 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 | « no previous file | tools/bots/get_chromium_build.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bots/fetch_reference_build.py
diff --git a/tools/bots/fetch_reference_build.py b/tools/bots/fetch_reference_build.py
new file mode 100755
index 0000000000000000000000000000000000000000..9ca6f5dafc91fe410466b1c7781371f0a4333522
--- /dev/null
+++ b/tools/bots/fetch_reference_build.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env 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.
+
+"""Fetches an archived chromium build into
+ src/chrome/tools/test/reference_build unless
+ src/chrome/tools/test/reference_build/REQUESTED_REVISION is the same as
+ src/chrome/tools/test/reference_build/CURRENT_REVISION.
+ Must be run from the root of a Dartium or multivm checkout.
+
+Usage:
+ $ ./src/dart/tools/bots/fetch_reference_build_revision.py
+"""
+
+import os
+import subprocess
+import sys
+
+def main(argv):
+ dirname = os.path.join('src', 'chrome', 'tools',
+ 'test', 'reference_build')
+ request = os.path.join(dirname, 'REQUESTED_REVISION')
+ found = os.path.join(dirname, 'CURRENT_REVISION')
+ if not os.path.exists(request):
+ return
+ with file(request, 'r') as f:
+ request_revision = f.read()
+
+ if os.path.exists(found):
+ with file(found, 'r') as f:
+ found_revision = f.read()
+ if found_revision == request_revision:
+ return
+
+ get_script = os.path.join('src', 'dart', 'tools',
+ 'bots', 'get_chromium_build.py')
+ get_script = os.path.abspath(get_script)
+ exit_code = subprocess.call(['python', get_script,
+ '-r', request_revision,
+ '-t', dirname])
+ if exit_code == 0:
+ with file(found, 'w') as f:
+ f.write(request_revision)
+ return exit_code
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
« no previous file with comments | « no previous file | tools/bots/get_chromium_build.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698