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

Side by Side Diff: scripts/slave/chromium/archive_build.py

Issue 2156983002: archive_build.py: use absolute path to src dir to construct build dir (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """A tool to archive a build and its symbols, executed by a buildbot slave. 6 """A tool to archive a build and its symbols, executed by a buildbot slave.
7 7
8 This script is used for developer builds. 8 This script is used for developer builds.
9 9
10 To archive files on Google Storage, set the 'gs_bucket' key in the 10 To archive files on Google Storage, set the 'gs_bucket' key in the
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 class StagerBase(object): 58 class StagerBase(object):
59 """Handles archiving a build. Call the public ArchiveBuild() method.""" 59 """Handles archiving a build. Call the public ArchiveBuild() method."""
60 60
61 def __init__(self, options, build_revision): 61 def __init__(self, options, build_revision):
62 """Sets a number of file and directory paths for convenient use.""" 62 """Sets a number of file and directory paths for convenient use."""
63 63
64 self.options = options 64 self.options = options
65 self._src_dir = os.path.abspath(options.src_dir) 65 self._src_dir = os.path.abspath(options.src_dir)
66 self._chrome_dir = os.path.join(self._src_dir, 'chrome') 66 self._chrome_dir = os.path.join(self._src_dir, 'chrome')
67 67
68 build_dir = build_directory.GetBuildOutputDirectory() 68 build_dir = build_directory.GetBuildOutputDirectory(self._src_dir or None)
tandrii(chromium) 2016/07/18 14:18:34 can _src_dir actually be '' or False? If not, remo
Paweł Hajdan Jr. 2016/07/18 14:20:27 It might be empty, and GetBuildOutputDirectory doe
tandrii(chromium) 2016/07/18 14:21:41 assuming by empty you mean '', OK.
69 self._build_dir = os.path.join(build_dir, options.target) 69 self._build_dir = os.path.join(build_dir, options.target)
70 if chromium_utils.IsWindows(): 70 if chromium_utils.IsWindows():
71 self._tool_dir = os.path.join(self._chrome_dir, 'tools', 'build', 'win') 71 self._tool_dir = os.path.join(self._chrome_dir, 'tools', 'build', 'win')
72 elif chromium_utils.IsLinux(): 72 elif chromium_utils.IsLinux():
73 # On Linux, we might have built for chromeos. Archive the same. 73 # On Linux, we might have built for chromeos. Archive the same.
74 if (options.factory_properties.get('chromeos', None) or 74 if (options.factory_properties.get('chromeos', None) or
75 slave_utils.GypFlagIsOn(options, 'chromeos')): 75 slave_utils.GypFlagIsOn(options, 'chromeos')):
76 self._tool_dir = os.path.join(self._chrome_dir, 'tools', 'build', 76 self._tool_dir = os.path.join(self._chrome_dir, 'tools', 'build',
77 'chromeos') 77 'chromeos')
78 # Or, we might have built for Android. 78 # Or, we might have built for Android.
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 663
664 if options.build_number is not None: 664 if options.build_number is not None:
665 s = StagerByBuildNumber(options) 665 s = StagerByBuildNumber(options)
666 else: 666 else:
667 s = StagerByChromiumRevision(options) 667 s = StagerByChromiumRevision(options)
668 return s.ArchiveBuild() 668 return s.ArchiveBuild()
669 669
670 670
671 if '__main__' == __name__: 671 if '__main__' == __name__:
672 sys.exit(main()) 672 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698