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

Side by Side Diff: tools/bots/gn_build.py

Issue 2412163002: GN: Add commands to bot scripts (Closed)
Patch Set: Created 4 years, 2 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 | tools/bots/gn_tests.py » ('j') | 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 # 2 #
3 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 6
7 import os 7 import os
8 import os.path 8 import os.path
9 import shutil 9 import shutil
10 import sys 10 import sys
11 import subprocess 11 import subprocess
12 12
13 import bot 13 SCRIPT_DIR = os.path.dirname(sys.argv[0])
14 import bot_utils 14 DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..', '..'))
15 15
16 utils = bot_utils.GetUtils() 16 def main(argv):
17 os.environ["DART_USE_GN"] = "1"
18 gclient_result = subprocess.call(['gclient', 'runhooks'])
19 if gclient_result != 0:
20 return gclient_result
17 21
18 BUILD_OS = utils.GuessOS() 22 build_py = os.path.join(DART_ROOT, 'tools', 'build.py')
19 23 build_result = subprocess.call(['python', build_py] + argv[1:])
20 (bot_name, _) = bot.GetBotName() 24 if build_result != 0:
21 CHANNEL = bot_utils.GetChannelFromName(bot_name) 25 return build_result
26 return 0
22 27
23 if __name__ == '__main__': 28 if __name__ == '__main__':
24 print "This step should build the sdk using gn" 29 sys.exit(main(sys.argv))
25 print "This script received the args: " + (" ".join(sys.argv))
26 print "Current directory when running on a bot should be"
27 print "/b/build/slave/[builder name]/build/sdk"
28
OLDNEW
« no previous file with comments | « no previous file | tools/bots/gn_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698