Add support for run-webkit-tests to start xvfb when necessary. |
|||||||
Issue descriptionBackground: Historically when the layout tests are run in our older CI infrastructure, they're executed via runtest.py which starts if necessary using build/scripts/slave/xvfb.py. This version starts openbox and then starts a process: Xvfb :9 -screen 0 1280x800x24 -ac -dpi 96 It saves the pid to a file so it can clean up this process later. For swarming, now, layout tests are run via run_isolated_script_test.py, which starts xvfb using src/testing/xvfb.py: *This* version starts openbox and xcompmgr and then starts: xvfb-run -a "--server-args=-screen 0 1280x800x24 -ac -nolisten tcp -dpi 96" <run-webkit-tests> According to comments in src/testing/xvfb.py openbox is for ChromeOS-related tests and so may not be required; xcompmgr may also not be required. On my workstation: Xvfb :8 -screen 0 1280x800x24 -ac -dpi 96 DISPLAY=:8 ./run-webkit-tests --smoke passes all the smoke tests, whereas just `DISPLAY=:8 ./run-webkit-tests --smoke` fails with a "Unable to open X display" error. The most obvious place to initialize and tear down Xvfb will be _set_up_run and _tear_down_run in Manager: https://cs.chromium.org/chromium/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py?l=327 We'll want to only start xvfb if we're on linux there's no X server currently. This could be checked with the current "system dependencies check" or by invoking another command that will exit with non-zero status with no X, e.g. `xprop -root`.
,
Apr 14 2017
Always running under xvfb: Pros: - don't need to check whether X is running - may make test runs more consistent Cons: - requires starting xvfb even if an X server is already running - requires adding a flag like --no-xvfb - may not be what some people expect on their workstations Either way seems fine to me. xdisplaycheck seems to exit quickly if X is running, but it waits and retries if it's not running, so it's a bit slower; it could be used, but is there any advantage to using that over running `xdpycheck` or `xprop -root`? Now uploaded a CL for review :-) https://codereview.chromium.org/2821543003
,
Apr 14 2017
Dunno if there's a real advantage, though if we don't want to use xdisplaycheck any more, we should probably just remove it. I think it's better to run under xvfb by default to better match what the bots do.
,
Apr 18 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8e209a99612f0af2a91c940967eacef653fa20b1 commit 8e209a99612f0af2a91c940967eacef653fa20b1 Author: qyearsley <qyearsley@chromium.org> Date: Tue Apr 18 19:42:20 2017 In run-webkit-tests, start xvfb if necessary. BUG= 711515 Review-Url: https://codereview.chromium.org/2821543003 Cr-Commit-Position: refs/heads/master@{#465331} [modify] https://crrev.com/8e209a99612f0af2a91c940967eacef653fa20b1/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_mock.py [modify] https://crrev.com/8e209a99612f0af2a91c940967eacef653fa20b1/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py [modify] https://crrev.com/8e209a99612f0af2a91c940967eacef653fa20b1/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux.py [modify] https://crrev.com/8e209a99612f0af2a91c940967eacef653fa20b1/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py
,
Apr 18 2017
Alright, it appears that this change didn't make much of a difference; the WebKit Linux Trusty jobs are still passing, and the Site Isolation Linux jobs are still failing in the same way; in both cases it logs something like 13:27:12.945 8176 "xdpyinfo -display :99" took 0.06s 13:27:12.946 8176 Starting Xvfb with display ":99". so we can tell that it's starting Xvfb in run-webkit-tests. https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Trusty https://build.chromium.org/p/chromium.fyi/builders/Site%20Isolation%20Linux
,
Apr 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/53b27041e4b3618926878898d8e57d7c7d73d157 commit 53b27041e4b3618926878898d8e57d7c7d73d157 Author: ojan <ojan@chromium.org> Date: Wed Apr 19 00:19:03 2017 Revert of In run-webkit-tests, start xvfb if necessary. (patchset #6 id:100001 of https://codereview.chromium.org/2821543003/ ) Reason for revert: Looks like it broke WebKit Android (Nexus4). https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Android%20%28Nexus4%29/builds/63884 https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.webkit%2FWebKit_Android__Nexus4_%2F63893%2F%2B%2Frecipes%2Fsteps%2Fwebkit_tests%2F0%2Fstdout Original issue's description: > In run-webkit-tests, start xvfb if necessary. > > BUG= 711515 > > Review-Url: https://codereview.chromium.org/2821543003 > Cr-Commit-Position: refs/heads/master@{#465331} > Committed: https://chromium.googlesource.com/chromium/src/+/8e209a99612f0af2a91c940967eacef653fa20b1 TBR=dpranke@chromium.org,tansell@chromium.org,qyearsley@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= 711515 Review-Url: https://codereview.chromium.org/2828623002 Cr-Commit-Position: refs/heads/master@{#465428} [modify] https://crrev.com/53b27041e4b3618926878898d8e57d7c7d73d157/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_mock.py [modify] https://crrev.com/53b27041e4b3618926878898d8e57d7c7d73d157/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py [modify] https://crrev.com/53b27041e4b3618926878898d8e57d7c7d73d157/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux.py [modify] https://crrev.com/53b27041e4b3618926878898d8e57d7c7d73d157/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py
,
Apr 19 2017
In theory, the part of that CL that may affect android would be the change in controllers/manager.py, I think. The next step will be to make another version of that change with a possible fix, and run it on android_blink_rel to make sure it works.
,
Apr 19 2017
,
Apr 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b8cba92beb55b43eba8fb7699452f7a278fc2398 commit b8cba92beb55b43eba8fb7699452f7a278fc2398 Author: qyearsley <qyearsley@chromium.org> Date: Wed Apr 19 22:16:06 2017 Reland of "In run-webkit-tests, start xvfb if necessary". Original CL (https://codereview.chromium.org/2821543003) broke Android. This is intended to be a reland of the original with modifications; it should only be committed after we get a successful run on android_blink_rel. BUG= 711515 Review-Url: https://codereview.chromium.org/2827073002 Cr-Commit-Position: refs/heads/master@{#465778} [modify] https://crrev.com/b8cba92beb55b43eba8fb7699452f7a278fc2398/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_mock.py [modify] https://crrev.com/b8cba92beb55b43eba8fb7699452f7a278fc2398/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py [modify] https://crrev.com/b8cba92beb55b43eba8fb7699452f7a278fc2398/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux.py [modify] https://crrev.com/b8cba92beb55b43eba8fb7699452f7a278fc2398/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py
,
Apr 20 2017
The change from comment #9 is preventing run-webkit-tests from launching a browser with layout test results here. I'm doing something like this: $ ./third_party/WebKit/Tools/Scripts/run-webkit-tests --no-retry-failures --disable-breakpad --no-pixel-tests --debug [paths] if something fails, DISPLAY will still be set to whatever Xvfb was using, and no browser is launched.
,
Apr 20 2017
Ah, I see! In webkitpy/layout_tests/manager.py, showing the results file is done after asking the ports to clean up the test run, so if the linux port can just save the original DISPLAY and restore it when cleaning up, I believe that should fix this issue. Will make a CL to try this now. Of course, if it were changed to not change DISPLAY, that would also be good.
,
Apr 20 2017
,
Apr 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e4e29231f2da03e0f447b5d4cbc2a4278bb9223e commit e4e29231f2da03e0f447b5d4cbc2a4278bb9223e Author: qyearsley <qyearsley@chromium.org> Date: Thu Apr 20 18:46:14 2017 Save and restore DISPLAY so that results.html can be shown. BUG= 711515 Review-Url: https://codereview.chromium.org/2829123002 Cr-Commit-Position: refs/heads/master@{#466084} [modify] https://crrev.com/e4e29231f2da03e0f447b5d4cbc2a4278bb9223e/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux.py
,
Apr 20 2017
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by dpranke@chromium.org
, Apr 13 2017