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

Side by Side Diff: recipe_modules/bot_update/resources/bot_update.py

Issue 1665753002: depot_tools: add more hacks to properly find build_internal (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 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 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 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 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 # TODO(hinoka): Use logging. 6 # TODO(hinoka): Use logging.
7 7
8 import cStringIO 8 import cStringIO
9 import codecs 9 import codecs
10 import collections 10 import collections
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 CURRENT_DIR = path.abspath(os.getcwd()) 48 CURRENT_DIR = path.abspath(os.getcwd())
49 BUILDER_DIR = path.dirname(CURRENT_DIR) 49 BUILDER_DIR = path.dirname(CURRENT_DIR)
50 SLAVE_DIR = path.dirname(BUILDER_DIR) 50 SLAVE_DIR = path.dirname(BUILDER_DIR)
51 51
52 # Relative to this script's filesystem path. 52 # Relative to this script's filesystem path.
53 THIS_DIR = path.dirname(path.abspath(__file__)) 53 THIS_DIR = path.dirname(path.abspath(__file__))
54 SCRIPTS_DIR = check_dir( 54 SCRIPTS_DIR = check_dir(
55 'scripts', [ 55 'scripts', [
56 path.dirname(THIS_DIR), 56 path.dirname(THIS_DIR),
57 path.join(SLAVE_DIR, '..', 'scripts'), 57 path.join(SLAVE_DIR, '..', 'scripts'),
58 path.join(THIS_DIR, # resources
59 '..', # bot_update
60 '..', # recipe_modules
61 '..', # depot_tools
62 '..', # .recipe_deps
63 '..', # slave
64 '..', # scripts
65 '..', # build_internal
66 '..', # ROOT_DIR
67 'build',
68 'scripts'),
69 path.join(SLAVE_DIR, '..', 'build', 'scripts'),
58 ], default=path.dirname(THIS_DIR)) 70 ], default=path.dirname(THIS_DIR))
59 BUILD_DIR = path.dirname(SCRIPTS_DIR) 71 BUILD_DIR = path.dirname(SCRIPTS_DIR)
60 ROOT_DIR = path.dirname(BUILD_DIR) 72 ROOT_DIR = path.dirname(BUILD_DIR)
61 73
62 DEPOT_TOOLS_DIR = path.abspath(path.join(THIS_DIR, '..', '..', '..')) 74 DEPOT_TOOLS_DIR = path.abspath(path.join(THIS_DIR, '..', '..', '..'))
63 75
64 BUILD_INTERNAL_DIR = check_dir( 76 BUILD_INTERNAL_DIR = check_dir(
65 'build_internal', [ 77 'build_internal', [
66 path.join(ROOT_DIR, 'build_internal'), 78 path.join(ROOT_DIR, 'build_internal'),
67 path.join(ROOT_DIR, # .recipe_deps 79 path.join(ROOT_DIR, # .recipe_deps
(...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 except Exception: 1744 except Exception:
1733 # Unexpected failure. 1745 # Unexpected failure.
1734 emit_flag(options.flag_file) 1746 emit_flag(options.flag_file)
1735 raise 1747 raise
1736 else: 1748 else:
1737 emit_flag(options.flag_file) 1749 emit_flag(options.flag_file)
1738 1750
1739 1751
1740 if __name__ == '__main__': 1752 if __name__ == '__main__':
1741 sys.exit(main()) 1753 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