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

Side by Side Diff: scripts/slave/compile.py

Issue 2175253002: declare exit_status before try (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 4 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 build chrome, executed by buildbot. 6 """A tool to build chrome, executed by buildbot.
7 7
8 When this is run, the current directory (cwd) should be the outer build 8 When this is run, the current directory (cwd) should be the outer build
9 directory (e.g., chrome-release/build/). 9 directory (e.g., chrome-release/build/).
10 10
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 Args: 393 Args:
394 options (Option): options for ninja command. 394 options (Option): options for ninja command.
395 args (str): extra args for ninja command. 395 args (str): extra args for ninja command.
396 env (dict): Used when ninja command executes. 396 env (dict): Used when ninja command executes.
397 397
398 Returns: 398 Returns:
399 int: ninja command exit status. 399 int: ninja command exit status.
400 400
401 """ 401 """
402 402
403 exit_status = -1
404
403 try: 405 try:
404 print 'chdir to %s' % options.src_dir 406 print 'chdir to %s' % options.src_dir
405 os.chdir(options.src_dir) 407 os.chdir(options.src_dir)
406 408
407 command = [options.ninja_path, '-w', 'dupbuild=err', 409 command = [options.ninja_path, '-w', 'dupbuild=err',
408 '-C', options.target_output_dir] 410 '-C', options.target_output_dir]
409 411
410 # HACK(yyanagisawa): update environment files on |env| update. 412 # HACK(yyanagisawa): update environment files on |env| update.
411 # For compiling on Windows, environment in environment files are used. 413 # For compiling on Windows, environment in environment files are used.
412 # It means even if enviroment such as GOMA_DISABLED is updated in 414 # It means even if enviroment such as GOMA_DISABLED is updated in
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 exit_status = main_ninja(options, args, env) 572 exit_status = main_ninja(options, args, env)
571 573
572 # stop goma 574 # stop goma
573 goma_teardown(options, env, exit_status, goma_cloudtail) 575 goma_teardown(options, env, exit_status, goma_cloudtail)
574 576
575 return exit_status 577 return exit_status
576 578
577 579
578 if '__main__' == __name__: 580 if '__main__' == __name__:
579 sys.exit(real_main()) 581 sys.exit(real_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