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

Side by Side Diff: build/android/avd.py

Issue 1634423002: Add support to run emulator without ui on bots (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | build/android/pylib/utils/emulator.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 (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 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 """Launches Android Virtual Devices with a set configuration for testing Chrome. 6 """Launches Android Virtual Devices with a set configuration for testing Chrome.
7 7
8 The script will launch a specified number of Android Virtual Devices (AVD's). 8 The script will launch a specified number of Android Virtual Devices (AVD's).
9 """ 9 """
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 run_parser.add_argument('--partition-size', dest='partition_size', 51 run_parser.add_argument('--partition-size', dest='partition_size',
52 default=emulator.DEFAULT_STORAGE_SIZE, 52 default=emulator.DEFAULT_STORAGE_SIZE,
53 help='Default internal storage size' 53 help='Default internal storage size'
54 ' e.g. --partition-size=1024M') 54 ' e.g. --partition-size=1024M')
55 run_parser.add_argument('--launch-without-kill', action='store_false', 55 run_parser.add_argument('--launch-without-kill', action='store_false',
56 dest='kill_and_launch', default=True, 56 dest='kill_and_launch', default=True,
57 help='Kill all emulators at launch') 57 help='Kill all emulators at launch')
58 run_parser.add_argument('--enable-kvm', action='store_true', 58 run_parser.add_argument('--enable-kvm', action='store_true',
59 dest='enable_kvm', default=False, 59 dest='enable_kvm', default=False,
60 help='Enable kvm for faster x86 emulator run') 60 help='Enable kvm for faster x86 emulator run')
61 run_parser.add_argument('--headless', action='store_true',
62 dest='headless', default=False,
63 help='Launch an emulator with no UI.')
61 64
62 arguments = arg_parser.parse_args(argv[1:]) 65 arguments = arg_parser.parse_args(argv[1:])
63 66
64 logging.root.setLevel(logging.INFO) 67 logging.root.setLevel(logging.INFO)
65 68
66 devil_chromium.Initialize() 69 devil_chromium.Initialize()
67 70
68 if arguments.command == 'kill': 71 if arguments.command == 'kill':
69 logging.info('Killing all existing emulator and existing the program') 72 logging.info('Killing all existing emulator and existing the program')
70 emulator.KillAllEmulators() 73 emulator.KillAllEmulators()
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 'Run install_emulator_deps.py.') 116 'Run install_emulator_deps.py.')
114 return 1 117 return 1
115 118
116 if arguments.name: 119 if arguments.name:
117 emulator.LaunchEmulator( 120 emulator.LaunchEmulator(
118 arguments.name, 121 arguments.name,
119 arguments.abi, 122 arguments.abi,
120 enable_kvm=arguments.enable_kvm, 123 enable_kvm=arguments.enable_kvm,
121 kill_and_launch=arguments.reset_and_launch, 124 kill_and_launch=arguments.reset_and_launch,
122 sdcard_size=arguments.sdcard_size, 125 sdcard_size=arguments.sdcard_size,
123 storage_size=arguments.partition_size 126 storage_size=arguments.partition_size,
127 headless=arguments.headless
124 ) 128 )
125 else: 129 else:
126 emulator.LaunchTempEmulators( 130 emulator.LaunchTempEmulators(
127 arguments.emulator_count, 131 arguments.emulator_count,
128 arguments.abi, 132 arguments.abi,
129 arguments.api_level, 133 arguments.api_level,
130 enable_kvm=arguments.enable_kvm, 134 enable_kvm=arguments.enable_kvm,
131 kill_and_launch=arguments.kill_and_launch, 135 kill_and_launch=arguments.kill_and_launch,
132 sdcard_size=arguments.sdcard_size, 136 sdcard_size=arguments.sdcard_size,
133 storage_size=arguments.partition_size, 137 storage_size=arguments.partition_size,
134 wait_for_boot=True 138 wait_for_boot=True,
139 headless=arguments.headless
135 ) 140 )
136 141
137 if __name__ == '__main__': 142 if __name__ == '__main__':
138 sys.exit(main(sys.argv)) 143 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/utils/emulator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698