New issue
Advanced search Search tips

Issue 726781 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

webkitpy unit test "test_build_check" is quite slow

Project Member Reported by qyears...@chromium.org, May 26 2017

Issue description

The slowest unit tests currently is RunTest.test_build_check, which quite a bit slower than the other unit tests.

0.2015s webkitpy.common.system.filesystem_unittest.RealFileSystemTest.test_remove_file_with_retry
0.2120s webkitpy.common.system.executive_unittest.ExecutiveTest.test_run_command_args_type
0.2647s webkitpy.layout_tests.run_webkit_tests_unittest.RunTest.test_virtual
0.3171s webkitpy.layout_tests.run_webkit_tests_unittest.RunTest.test_smoke_test
0.3873s webkitpy.common.system.executive_unittest.ExecutiveTest.test_run_command_with_unicode
0.5189s webkitpy.style.checkers.python_unittest.PythonCheckerTest.test_check
3.0097s webkitpy.layout_tests.run_webkit_tests_unittest.RunTest.test_build_check

Link to this particular test:
https://cs.chromium.org/chromium/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py?l=971
 
Labels: Hotlist-GoodFirstBug
Labels: Hotlist-CodeHealth
Status: Available (was: Unconfirmed)
Cc: jeffcarp@chromium.org
Owner: qyears...@chromium.org
Status: Assigned (was: Available)
Notes

 - This may have after https://codereview.chromium.org/2827073002
 
 - When run_webkit_tests.main is run in this test, it actually goes until the "Checking system dependencies", and exits with an error exit code there, which is probably not the intent of the test.
 
 - Within this unit test, the tests are listed, which in turn calls the manifest generator. This is probably why the test takes 3 seconds to run. Currently, tests are always listed before the build check, and this always involves running the manifest script.

Proposed changes:
 In layout_tests/port/base.py, fix check_build so that it actually returns the right exit code when the build isn't found.
 In layout_tests/controllers/manager.py, optimize so that the manifest isn't called when there are clearly no wpt tests to run.
Project Member

Comment 5 by bugdroid1@chromium.org, Jun 9 2017

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

commit 8058d1d4dfbea1ace4e9403fdff4ddeff49b8d41
Author: Quinten Yearsley <qyearsley@google.com>
Date: Fri Jun 09 17:32:05 2017

Skip generating manifest if only non-wpt tests are specified.

Bug:  726781 
Change-Id: I473bf648562acc2e620e0ea4ea617464d8d7eb92
Reviewed-on: https://chromium-review.googlesource.com/528297
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Jeff Carpenter <jeffcarp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478321}
[modify] https://crrev.com/8058d1d4dfbea1ace4e9403fdff4ddeff49b8d41/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
[modify] https://crrev.com/8058d1d4dfbea1ace4e9403fdff4ddeff49b8d41/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py

Status: Fixed (was: Assigned)
Project Member

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

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

commit 2eacda6204994f9639585a7adcce3d04a2b83bed
Author: Quinten Yearsley <qyearsley@google.com>
Date: Mon Jun 12 18:19:55 2017

Fix Port.check_build so that it returns error code when build not found.

Before this CL, the unit test method test_build_check was
still passing even though the check_build behavior wasn't quite
as intended, I think -- run_webkit_tests.main was still exiting
with an error code, but not because the build check failed.

This CL fixes the test and Port.check_build, and simplifies the logic
in Port.check_build.

Bug:  726781 
Change-Id: I03ff816245e244ea05e75e34fe8fabc649f41865
Reviewed-on: https://chromium-review.googlesource.com/528394
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478686}
[modify] https://crrev.com/2eacda6204994f9639585a7adcce3d04a2b83bed/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py
[modify] https://crrev.com/2eacda6204994f9639585a7adcce3d04a2b83bed/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py
[modify] https://crrev.com/2eacda6204994f9639585a7adcce3d04a2b83bed/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py

Sign in to add a comment