diff options
author | Ying Chen <chying@google.com> | 2015-12-04 18:23:19 -0800 |
---|---|---|
committer | Ying Chen <chying@google.com> | 2015-12-04 18:23:19 -0800 |
commit | 6dcbaca932478a1c54e723471c2f3a3485989c0e (patch) | |
tree | d9e30c8f0c58ec7bdc451c5c344760555b680d28 | |
parent | 3b03e2ad2b62115407a78e62d359df5f5344898f (diff) | |
download | adt-infra-6dcbaca932478a1c54e723471c2f3a3485989c0e.tar.gz |
Launch emulator with -verbose and -show-kernel for more debug information
- print output if launch failed
Change-Id: I3d7ac8e56d175720e4edbec0bc0870b407449385
-rw-r--r-- | emu_test/utils/emu_testcase.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/emu_test/utils/emu_testcase.py b/emu_test/utils/emu_testcase.py index 673039ea..ff647963 100644 --- a/emu_test/utils/emu_testcase.py +++ b/emu_test/utils/emu_testcase.py @@ -106,15 +106,17 @@ class EmuBaseTestCase(LoggedTestCase): def launch_emu(self, avd): """Launch given avd and return immediately""" exec_path = emu_args.emulator_exec - launch_cmd = [exec_path, "-avd", str(avd), "-wipe-data"] + launch_cmd = [exec_path, "-avd", str(avd), "-verbose", "-show-kernel", "-wipe-data"] if avd.ranchu == "yes": launch_cmd += ["-ranchu"] self.m_logger.info('Launching AVD, cmd: %s', ' '.join(launch_cmd)) - start_proc = psutil.Popen(launch_cmd, stdout=PIPE, stderr=PIPE) + self.start_proc = psutil.Popen(launch_cmd, stdout=PIPE, stderr=PIPE) time.sleep(5) - if start_proc.poll() is not None and start_proc.poll() is not 0: - self.m_logger.error(start_proc.communicate()[1]) + if self.start_proc.poll() is not None and self.start_proc.poll() is not 0: + out, err = self.start_proc.communicate() + self.m_logger.error(out) + self.m_logger.error(err) raise LaunchError(str(avd)) def launch_emu_and_wait(self, avd): |