From 5c92f56262be4872bebba902902dff1e9921dbfa Mon Sep 17 00:00:00 2001 From: Ying Chen Date: Wed, 13 Jan 2016 19:01:18 -0800 Subject: A few bug fix - add popen.wait on emulator launch process, otherwise it will become zombie process - reduce master timeout to 1800 seconds - add buildtools directory to path for CTS Change-Id: Ie5b8cfbdb3198f27ded3ed06f53f4b01fc52e8f4 --- build/masters/master.client.adt/templates/waterfall.html | 2 +- build/scripts/master/factory/annotator_factory.py | 2 +- build/scripts/slave/recipes/adt/adt.py | 3 ++- emu_test/test_boot/test_boot.py | 5 ++++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/build/masters/master.client.adt/templates/waterfall.html b/build/masters/master.client.adt/templates/waterfall.html index 89a30354..96355f88 100644 --- a/build/masters/master.client.adt/templates/waterfall.html +++ b/build/masters/master.client.adt/templates/waterfall.html @@ -7,7 +7,7 @@ - Chromium
+ Emulator
last build diff --git a/build/scripts/master/factory/annotator_factory.py b/build/scripts/master/factory/annotator_factory.py index 1752b70a..da250452 100644 --- a/build/scripts/master/factory/annotator_factory.py +++ b/build/scripts/master/factory/annotator_factory.py @@ -22,7 +22,7 @@ class AnnotatorFactory(object): self.active_master = active_master def BaseFactory(self, recipe=None, factory_properties=None, triggers=None, - timeout=7200, max_time=None): + timeout=1800, max_time=None): """The primary input for the factory is the |recipe|, which specifies the name of a recipe file to search for. The recipe file will fill in the rest of the |factory_properties|. This setup allows for major changes to factory diff --git a/build/scripts/slave/recipes/adt/adt.py b/build/scripts/slave/recipes/adt/adt.py index 53868568..cb5d7386 100644 --- a/build/scripts/slave/recipes/adt/adt.py +++ b/build/scripts/slave/recipes/adt/adt.py @@ -56,7 +56,8 @@ def RunSteps(api): android_tools_dir = os.path.join(android_sdk_home, 'tools') android_platform_dir = os.path.join(android_sdk_home, 'platform-tools') - env_path += [android_tools_dir, android_platform_dir] + android_buildtools_dir = os.path.join(android_sdk_home, 'build-tools', '23.0.2') + env_path += [android_tools_dir, android_platform_dir, android_buildtools_dir] env = {'PATH': api.path.pathsep.join(env_path), 'ANDROID_SDK_ROOT': android_sdk_home} diff --git a/emu_test/test_boot/test_boot.py b/emu_test/test_boot/test_boot.py index 07817ecd..9e9551f0 100644 --- a/emu_test/test_boot/test_boot.py +++ b/emu_test/test_boot/test_boot.py @@ -36,7 +36,8 @@ class BootTestCase(EmuBaseTestCase): self.m_logger.debug('First try - quit emulator by adb emu kill') kill_proc = psutil.Popen(["adb", "emu", "kill"]) # check emulator process is terminated - if not self.term_check(timeout=5): + result = self.term_check(timeout=5) + if not result: self.m_logger.debug('Second try - quit emulator by psutil') kill_proc_by_name(["emulator", "qemu-system"]) result = self.term_check(timeout=10) @@ -45,6 +46,8 @@ class BootTestCase(EmuBaseTestCase): # avd should be found $HOME/.android/avd/ avd_dir = os.path.join(os.path.expanduser('~'), '.android', 'avd') try: + if result: + self.start_proc.wait() kill_proc_by_name(["crash-service"]) psutil.Popen(["adb", "kill-server"]) os.remove(os.path.join(avd_dir, '%s.ini' % self.avd_config.name())) -- cgit v1.2.3