Commit graph

7 commits

Author SHA1 Message Date
Noah Gold
ea5ffed771 metrics: migrate to proto_build_tools.
BUG=b:256951877
TEST=builds

Change-Id: Iea6ab37489e87b1c8ca3c33fbf4a0d974a9b59ca
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4021591
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>
2022-11-12 01:02:23 +00:00
Dennis Kempin
278e5ffeba test_runner: Add separate cargo target dir for each platform
Using the same CARGO_TARGET_DIR for all builds prevents us from
building for platforms in parallel, since cargo will lock the
directory to only run one build at a time.

Use the same directory for clippy as well, and ensure that
clippy won't invalidate caches created by run_tests.

This reduces the build time for tools/presubmit by about 50%.

Another advantage is that rust_analyzer and run_tests will no longer
block each other or invalidate the cache when run with different
feature flags.

Note: This introduces two subtle changes to the build that required nit
fixes:
- build.rs files are now run through clippy as well
- common/* crates are now also built for the target architecture instead
  the host.

BUG=None
TEST=tools/presubmit

Change-Id: I8da9ef53418c0b15827d512a04e77828621aef88
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3984416
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-10-31 21:33:33 +00:00
Dennis Kempin
1dab58a2cf Update all copyright headers to match new style
This search/replace updates all copyright notices to drop the
"All rights reserved", Use "ChromiumOS" instead of "Chromium OS"
and drops the trailing dots.

This fulfills the request from legal and unifies our notices.

./tools/health-check has been updated to only accept this style.

BUG=b:246579983
TEST=./tools/health-check

Change-Id: I87a80701dc651f1baf4820e5cc42469d7c5f5bf7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3894243
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-09-13 18:41:29 +00:00
Dennis Kempin
4fea399df9 Reformat imports
crosvm is switching the import style to use one import per line.
While more verbose, this will greatly reduce the occurence of merge
conflicts going forward.

Note: This is using a nightly feature of rustfmt. So it's a one-off
re-format only. We are considering adding a nightly toolchain to
enable the feature permanently.

BUG=b:239937122
TEST=CQ

Change-Id: Id2dd4dbdc0adfc4f8f3dd1d09da1daafa2a39992
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3784345
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-07-28 00:15:50 +00:00
Michael Hoyle
c29271e168 Revert "Revert "metrics: Add metrics crate.""
This reverts commit 55a5c8d8f9.

In order to accommodate the removal of the
UnixSeqPacket+CloseNotifier change, I updated the controller.rs
to reference platform-specific internal implementations.

On Windows, CloseNotifier is used to detect closed Tubes.
On Linux, we rely on PollContext returning because the socket fd
    is hung up.

Some minor adjustmets to the code were made just to allow as
litte duplication as possible.

In the end, very little logic has changed from the original CL,
it's just moved around.

TL;DR:
This fixes the downstream regression by removing its dependency
on the breaking changes to base.

BUG=b:232316549
FIXED=b:232316549
TEST=Crosvm tests

Change-Id: I946d5096f7a312538c3c694950697fab1be7f0ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3661257
Commit-Queue: Michael Hoyle <mikehoyle@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-25 04:45:13 +00:00
Shao-Chuan Lee
55a5c8d8f9 Revert "metrics: Add metrics crate."
This reverts commit 4c2017c757.

Reason for revert: dependency crrev.com/c/3622798 caused regression

Original change's description:
> metrics: Add metrics crate.
>
> This crate is effectively a collection of stubs in this repo,
> but will allow a downstream repo to implement those stubs.
>
> BUG=b:213152497
> FIXED=b:213152497
> TEST=build + kokoro
>
> Change-Id: I3c544644ec3d7917f9ebb2e8621042c35b556db8
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3622799
> Reviewed-by: Noah Gold <nkgold@google.com>
> Commit-Queue: Michael Hoyle <mikehoyle@google.com>
> Tested-by: kokoro <noreply+kokoro@google.com>

BUG=b:213152497,b:232316549
TEST=CtsAccessibilityServiceTestCases

Change-Id: Idd636d7d34e68977fffc1f6c0a89924eb7be5d54
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3641218
Auto-Submit: Shao-Chuan Lee <shaochuan@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Michael Hoyle <mikehoyle@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-05-12 16:31:51 +00:00
Michael Hoyle
4c2017c757 metrics: Add metrics crate.
This crate is effectively a collection of stubs in this repo,
but will allow a downstream repo to implement those stubs.

BUG=b:213152497
FIXED=b:213152497
TEST=build + kokoro

Change-Id: I3c544644ec3d7917f9ebb2e8621042c35b556db8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3622799
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Michael Hoyle <mikehoyle@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-10 03:52:13 +00:00