From f86cdf272a8d2a0427d7e05e996811a19cb611e9 Mon Sep 17 00:00:00 2001 From: Sven Zheng Date: Sat, 19 Nov 2022 02:16:05 +0000 Subject: [PATCH] Update Lacros docs Adds a few references and updates some styles. Change-Id: Ic2606f20fda1924d0c86d109db84d776600228ae Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4035146 Reviewed-by: Erik Chen Commit-Queue: Sven Zheng Cr-Commit-Position: refs/heads/main@{#1073693} --- docs/README.md | 2 ++ docs/lacros.md | 21 ++------------------- docs/lacros/build_instructions.md | 19 ++++++++++++++----- 3 files changed, 18 insertions(+), 24 deletions(-) diff --git a/docs/README.md b/docs/README.md index 698eae22f62abe..7613944801ec47 100644 --- a/docs/README.md +++ b/docs/README.md @@ -69,6 +69,7 @@ used when committed. * [iOS Build Instructions](ios/build_instructions.md) - iOS target (on a MacOS host) * [Chrome OS Build Instructions](chromeos_build_instructions.md) - Chrome OS +* [Lacros Build Instructions](lacros/build_instructions.md) - Lacros * [Linux Chromium ARM Recipes](linux/chromium_arm.md) - Recipes for building Chromium for ARM on Linux. * [Chrome Component Build](component_build.md) - Faster builds using more @@ -329,6 +330,7 @@ used when committed. * [Debugging UI in OOBE/login/lock](login/ui_debugging.md) * [Chrome Logging on Chrome OS](chrome_os_logging.md) * [Debugging tips](testing/chromeos_debugging_tips.md) +* [What is Lacros](lacros.md) ### Misc WebUI-Specific Docs * [Creating WebUI Interfaces in components/](webui_in_components.md) How to diff --git a/docs/lacros.md b/docs/lacros.md index 3db2fec03fd96d..21bfc127af22e2 100644 --- a/docs/lacros.md +++ b/docs/lacros.md @@ -7,6 +7,7 @@ OS window manager and system UI. The name comes from **L**inux **A**nd **C**h**R**ome **OS**. Googlers: [go/lacros](http://go/lacros) has internal docs. +More Lacros documents in //docs/lacros. ## Technical details @@ -96,25 +97,7 @@ binary (lacros or ash) a feature should live in. ## Testing -Most test suites require ash-chrome to be running in order to provide a basic -Wayland server. This requires a special test runner: - -`./build/lacros/test_runner.py test out/lacros/browser_tests --gtest_filter=BrowserTest.Title` - -Some test suites require ash-chrome to provide both a Wayland server and a valid -mojo crosapi connection. This requires the test target -`lacros_chrome_browsertests`: - -`./build/lacros/test_runner.py test out/lacros/lacros_chrome_browsertests --gtest_filter=ScreenManagerLacrosBrowserTest.*` - -By default, the test runner downloads a prebuilt ash-chrome, add the -`--ash-chrome-path` command line argument to run the test against a locally -built version of Ash: - -`./build/lacros/test_runner.py test --ash-chrome-path=out/ash/chrome out/lacros/lacros_chrome_browsertests --gtest_filter=ScreenManagerLacrosBrowserTest.*` - -If you're sshing to your desktop, please prefix the command with -`./testing/xvfb.py`. +See [Test instructions](lacros/test_instructions.md). For sheriffs: Test failures that should have been caught by the CQ should be treated like test failures on any other platform: investigated and fixed or diff --git a/docs/lacros/build_instructions.md b/docs/lacros/build_instructions.md index c4d9db79573a4f..970c62ef8d007d 100644 --- a/docs/lacros/build_instructions.md +++ b/docs/lacros/build_instructions.md @@ -13,7 +13,9 @@ Are you a Google employee? See There are roughly three ways to develop Lacros: -1 Building and running on a Linux workstation. This typically is faster for +## Building and running on a Linux workstation. + +This typically is faster for development and requires no specialized hardware. The downside is that some functionality is stubbed out (typically hardware / peripherals), some functionality is different (some parts of graphics stack), and this is not @@ -23,10 +25,12 @@ The workflow is similar to developing for Chrome on Linux. The core difference is that instead of building and running a single binary [e.g. "chrome"] we must build and run two binaries. "ash-chrome" is a ChromeOS runtime (shelf, window manager, launcher, etc.) with some functionality stubbed out. -"lacros-chrome" is a binary that runs within the context of "ash-chrome" +"lacros-chrome" is a binary that runs within the context of "ash-chrome". + See [Lacros: Build Instructions (Linux)](build_linux_lacros.md) -2 Building on a Linux workstation and running on a physical ChromeOS device. +## Building on a Linux workstation and running on a physical ChromeOS device + This has much higher startup cost but is necessary for some features: hardware-specific, performance, some aspects of graphics, supervised services on DUT. @@ -35,12 +39,17 @@ The workflow is similar to developing Chrome for ChromeOS. The core difference is that instead of deploying a single binary "ash-chrome" via deploy_chrome.py, we must build and deploy two binaries: "ash-chrome" and "lacros-chrome" via deploy_chrome.py. + See [Lacros: Build Instructions (DUT)](build_dut_lacros.md) -3 Building on a Linux workstation and running on a ChromeOS VM running on the -same Linux workstation. This is not well supported but we have instructions +## Building on a Linux workstation and running on a ChromeOS VM running on the same Linux workstation + +This is not well supported but we have instructions from developers who have successfully managed to do this. If you do end up using multiple workflows, please be careful not to mix the output directories as the binaries produced from each workflow are not interchangeable. + +# Testing +See [Test instructions](test_instructions.md).