New issue
Advanced search Search tips

Issue 730406 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: ----
Type: ----



Sign in to add a comment

Exception in ChromiumAndroidDriver.__del__ in webkitpy unit tests

Project Member Reported by tansell@chromium.org, Jun 7 2017

Issue description

This output appears frequently in the output of webkitpy unit tests;
----
[238/695] webkitpy.layout_tests.models.testharness_results_unittest.TestHarnessResultCheckerTest.test_is_testharness_output_passing_with_timeout_or_notrun passed
 in [239/695] webkitpy.layout_tests.port.base_unittest.PortTest.test_additional_env_var passed<bound method ChromiumAndroidDriver.__del__ of <webkitpy.layout_tests.port.android.ChromiumAndroidDriver object at 0x7f33554a0b10>> ignored
----

I'm running on Linux using 
third_party/WebKit/Tools/Scripts/test-webkitpy -v --passthrough webkitpy.layout_tests

 
Cc: -qyears...@chromium.org
Owner: qyears...@chromium.org
Status: Started (was: Untriaged)
The exception is:

Exception TypeError: "'Mock' object is not iterable" in <bound method ChromiumAndroidDriver.__del__ of <webkitpy.layout_tests.port.android.ChromiumAndroidDriver object at 0x7f670c61f610>>

The problem appears to be in these four tests:

webkitpy.layout_tests.port.android_unittest.AndroidPortTest.test_driver_cmd_line
webkitpy.layout_tests.port.android_unittest.ChromiumAndroidDriverTest.test_read_prompt
webkitpy.layout_tests.port.android_unittest.ChromiumAndroidDriverTwoDriversTest.test_two_drivers
webkitpy.layout_tests.port.android_unittest.ChromiumAndroidTwoPortsTest.test_options_with_two_ports

Specifically, the errors are raised in devil.android.perf.perf_control.PerfControl when passed a Mock instead of a real DeviceUtils object.

Seems like in unit tests for the android port, we're not using actual devices and don't want to care about controlling the performance mode of the device.

Proposed solution:
https://chromium-review.googlesource.com/c/527236/

After that, if I run ./test-webkitpy directly, I get:

Exception ImportError: 'No module named psutil' in <bound method ChromiumAndroidDriver.__del__ of <webkitpy.layout_tests.port.android.ChromiumAndroidDriver object at 0x7f3798de9f10>> ignored

And that's because ./test-webkitpy uses vpython in the shebang line, which makes it so that psutil is not available; the solution for that should be to make sure that psutil is in the vpython env config, which is a separate issue.
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/66ed30017177d5a37a8b54e3269cdc76b242c32d

commit 66ed30017177d5a37a8b54e3269cdc76b242c32d
Author: Quinten Yearsley <qyearsley@google.com>
Date: Wed Jun 07 19:25:46 2017

Mock out PerfControl in Android Port unit tests.

Bug:  730406 
Change-Id: I49d2d24f4f2ae2c0f9462904bf07f63844bf75af
Reviewed-on: https://chromium-review.googlesource.com/527236
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#477723}
[modify] https://crrev.com/66ed30017177d5a37a8b54e3269cdc76b242c32d/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android_unittest.py

Status: Fixed (was: Started)

Sign in to add a comment