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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/bots/gn_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bots/gn_build.py
diff --git a/tools/bots/gn_build.py b/tools/bots/gn_build.py
index 73a7e4228667c7f17e8730c5ab2af0510226afbd..f7976526cd063da3be67d6785a848a71475162a1 100644
--- a/tools/bots/gn_build.py
+++ b/tools/bots/gn_build.py
@@ -10,19 +10,20 @@ import shutil
import sys
import subprocess
-import bot
-import bot_utils
+SCRIPT_DIR = os.path.dirname(sys.argv[0])
+DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..', '..'))
-utils = bot_utils.GetUtils()
+def main(argv):
+ os.environ["DART_USE_GN"] = "1"
+ gclient_result = subprocess.call(['gclient', 'runhooks'])
+ if gclient_result != 0:
+ return gclient_result
-BUILD_OS = utils.GuessOS()
-
-(bot_name, _) = bot.GetBotName()
-CHANNEL = bot_utils.GetChannelFromName(bot_name)
+ build_py = os.path.join(DART_ROOT, 'tools', 'build.py')
+ build_result = subprocess.call(['python', build_py] + argv[1:])
+ if build_result != 0:
+ return build_result
+ return 0
if __name__ == '__main__':
- print "This step should build the sdk using gn"
- print "This script received the args: " + (" ".join(sys.argv))
- print "Current directory when running on a bot should be"
- print "/b/build/slave/[builder name]/build/sdk"
-
+ sys.exit(main(sys.argv))
« 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