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

Side by Side Diff: blimp/tools/client_engine_integration.py

Issue 2283083002: Detach engine popen process with parent process (Closed)
Patch Set: Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 2 # Copyright 2016 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 """Blimp Client + Engine integration test system 6 """Blimp Client + Engine integration test system
7 7
8 Set up Client and Engine 8 Set up Client and Engine
9 Set up Forward to connect machine host with client device. 9 Set up Forward to connect machine host with client device.
10 Start Engine and run blimp on Android Client. 10 Start Engine and run blimp on Android Client.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 run_engine_cmd = [ 99 run_engine_cmd = [
100 blimp_engine_app + 100 blimp_engine_app +
101 ' --android-fonts-path=' + blimp_fonts_path + 101 ' --android-fonts-path=' + blimp_fonts_path +
102 ' --blimp-client-token-path=' + token_file_path + 102 ' --blimp-client-token-path=' + token_file_path +
103 ' --enable-logging=stderr' + 103 ' --enable-logging=stderr' +
104 ' -v=0' + 104 ' -v=0' +
105 ' --vmodule="blimp*=1"'] 105 ' --vmodule="blimp*=1"']
106 p = subprocess.Popen(run_engine_cmd, shell=True, 106 p = subprocess.Popen(run_engine_cmd, shell=True,
107 stdout=subprocess.PIPE, 107 stdout=subprocess.PIPE,
108 stderr=subprocess.STDOUT) 108 stderr=subprocess.STDOUT,
109 preexec_fn=os.setsid)
shenghuazhang 2016/08/26 19:47:41 This shall creates a new process for the popen. No
jbudorick 2016/08/26 21:15:06 No, the simulation test won't verify this. Testing
109 110
110 for line in iter(p.stdout.readline, ''): 111 for line in iter(p.stdout.readline, ''):
111 sys.stdout.write(line) 112 sys.stdout.write(line)
112 l = line.rstrip() 113 l = line.rstrip()
113 match = re.match(PORT_PATTERN, l) 114 match = re.match(PORT_PATTERN, l)
114 if match: 115 if match:
115 port = match.group(1) 116 port = match.group(1)
116 break 117 break
117 118
118 return port, p 119 return port, p
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 else None) 322 else None)
322 device = device_utils.DeviceUtils.HealthyDevices( 323 device = device_utils.DeviceUtils.HealthyDevices(
323 blacklist=blacklist, device_arg=serial)[0] 324 blacklist=blacklist, device_arg=serial)[0]
324 325
325 args.func(args, json_file_path, device) 326 args.func(args, json_file_path, device)
326 327
327 328
328 if __name__ == '__main__': 329 if __name__ == '__main__':
329 main() 330 main()
330 331
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