New issue
Advanced search Search tips

Issue 747498 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

webkitpy lint_test_expectations_unittest is very slow

Project Member Reported by qyears...@chromium.org, Jul 21 2017

Issue description

To reproduce:

$ ./test-webkitpy -vt webkitpy.layout_tests.lint_test_expectations_unittest
...
[9/10] webkitpy.layout_tests.lint_test_expectations_unittest.MainTest.test_interrupt passed 2.5436s
[10/10] webkitpy.layout_tests.lint_test_expectations_unittest.MainTest.test_exception passed 2.7232s

Expected:
All unit tests should complete in less than a second.

The last time I observed super slow unit tests like this, it was because the wpt manifest script was being run inside the test.
 
Just noticed that this has been happening since the .any.js CL since it adds a call to ensure_manifest in lint_test_expectations main (as it should):

https://chromium.googlesource.com/chromium/src/+/70bac5d90548b60766f465c6dfed206b32a38ebd/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations.py#157

It would be good to think of some relatively clean way to make the unit tests use a fake filesystem. One possible way to do this might be to make the main function take a Host, and pass it a MockHost in unit test.
Owner: qyears...@chromium.org
Status: Started (was: Available)
https://chromium-review.googlesource.com/583469
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 24 2017

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

commit b6326dbba2a5b7e2b1ce7979031149dd8013ad20
Author: Quinten Yearsley <qyearsley@google.com>
Date: Mon Jul 24 20:21:43 2017

Make lint_test_expectations_unittest not so slow

Two of the test methods in this unit test were slow because
they were running the manifest script.

This CL:
 1. Changes the main function to optionally take a Host
 2. Changes the tests to pass a MockHost
 3. Also removes an unused argument (stdout) from main

Bug:  747498 
Change-Id: I22eccc9b372f292e8ae4efae78dca5d330ac3dc7
Reviewed-on: https://chromium-review.googlesource.com/583469
Reviewed-by: Jeff Carpenter <jeffcarp@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489063}
[modify] https://crrev.com/b6326dbba2a5b7e2b1ce7979031149dd8013ad20/third_party/WebKit/Tools/Scripts/lint-test-expectations
[modify] https://crrev.com/b6326dbba2a5b7e2b1ce7979031149dd8013ad20/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations.py
[modify] https://crrev.com/b6326dbba2a5b7e2b1ce7979031149dd8013ad20/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py

Status: Fixed (was: Started)

Sign in to add a comment