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

Side by Side Diff: tools/dart_for_gn.py

Issue 2493833002: GN: Don't depend on dart_bootstrap if there is a usable prebuilt sdk (Closed)
Patch Set: Created 4 years, 1 month 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 | « runtime/vm/BUILD.gn ('k') | utils/analysis_server/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright 2016 The Dart project authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 # Usage: dart_for_gn.py path_to_dart_binary [arguments]
7 #
8 # We have gn set up so that actions can only run python scripts.
9 # We use this wrapper script when we need an action to run the Dart VM
10 # The first command line argument is mandatory and should be the absolute path
11 # to the Dart VM binary.
12
13 import subprocess
14 import sys
15
16 def run_command(command):
17 try:
18 subprocess.check_output(command, stderr=subprocess.STDOUT)
19 return 0
20 except subprocess.CalledProcessError as e:
21 return ("Command failed: " + ' '.join(command) + "\n" +
22 "output: " + e.output)
23
24 def main(argv):
25 if len(argv) < 2:
26 print "Requires path to Dart VM binary as first argument"
27 return -1
28 result = run_command(argv[1:])
29 if result != 0:
30 print result
31 return -1
32 return 0
33
34 if __name__ == '__main__':
35 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « runtime/vm/BUILD.gn ('k') | utils/analysis_server/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698