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

Side by Side Diff: mojo/tools/mojo_demo.py

Issue 878933003: Move the apptest runner and parts of mopy to the public SDK. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « mojo/tools/get_test_list.py ('k') | mojo/tools/mojob.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 # 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 from mopy.config import Config
7 import argparse 6 import argparse
8 import mopy.paths
9 import os 7 import os
10 import pipes 8 import pipes
11 import subprocess 9 import subprocess
12 import sys 10 import sys
13 11
12 import add_sdk_tools_to_path
13 from mopy.config import Config
14 import mopy.paths
15
14 # FIXME: We need to merge the mojo/tools and sky/tools directories 16 # FIXME: We need to merge the mojo/tools and sky/tools directories
15 sys.path.append(os.path.join(mopy.paths.Paths().src_root, 'sky', 'tools')) 17 sys.path.append(os.path.join(mopy.paths.Paths().src_root, 'sky', 'tools'))
16 from skypy.skyserver import SkyServer 18 from skypy.skyserver import SkyServer
17 import skypy.paths 19 import skypy.paths
18 20
19 21
20 def main(): 22 def main():
21 parser = argparse.ArgumentParser(description='Helper to launch mojo demos') 23 parser = argparse.ArgumentParser(description='Helper to launch mojo demos')
22 parser.add_argument('-d', dest='build_dir', type=str) 24 parser.add_argument('-d', dest='build_dir', type=str)
23 parser.add_argument('--browser', action='store_const', const='browser', 25 parser.add_argument('--browser', action='store_const', const='browser',
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 66
65 # http://stackoverflow.com/questions/4748344/whats-the-reverse-of-shlex-split 67 # http://stackoverflow.com/questions/4748344/whats-the-reverse-of-shlex-split
66 # shlex.quote doesn't exist until 3.3 68 # shlex.quote doesn't exist until 3.3
67 # This doesn't print exactly what we want, but it's better than nothing: 69 # This doesn't print exactly what we want, but it's better than nothing:
68 print " ".join(map(pipes.quote, cmd)) 70 print " ".join(map(pipes.quote, cmd))
69 with server: 71 with server:
70 return subprocess.call(cmd) 72 return subprocess.call(cmd)
71 73
72 if __name__ == '__main__': 74 if __name__ == '__main__':
73 sys.exit(main()) 75 sys.exit(main())
OLDNEW
« no previous file with comments | « mojo/tools/get_test_list.py ('k') | mojo/tools/mojob.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698