Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |