Commit graph

15 commits

Author SHA1 Message Date
Kameron Lutes
299c1121c3 crosvm_control: Add make_rt API
Adds a make_rt API to the crosvm_control library.

BUG=b:188858559
TEST=cq

Change-Id: I3affcd6cb003a17f125b45e78906fabe1e371c43
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3635255
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Kameron Lutes <kalutes@chromium.org>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
2022-05-10 01:29:17 +00:00
Daniel Verkamp
45b0920767 doc: add a top-level comment to all crates
This provides at least a minimal one-line description to show what each
crate is about.

BUG=None
TEST=tools/cargo-doc

Change-Id: I26732e8c29062e622d5be09bdc120a49d564b9fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3630422
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-06 20:46:57 +00:00
Keiichi Watanabe
94e753c41e crosvm_control: Skip build.rs when cargo-doc is called
This will fix GitHub Action's failure.
This couldn't be caught in kokoro because kokoro sets correct
environment variables for testing.

BUG=none
TEST=./tools/cargo-doc

Change-Id: I1db2e459422e755f6231cb0a6e5e082ffa0727ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3581449
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Kameron Lutes <kalutes@chromium.org>
2022-04-21 00:17:25 +00:00
Keiichi Watanabe
b24aa4cb84 crosvm_control: Use anyhow in build.rs
This provides clearer error message.

BUG=none
TEST=cargo check

Change-Id: I954be94b2961383f2c23da104e695321e49e497e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3581448
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Kameron Lutes <kalutes@chromium.org>
2022-04-20 23:53:07 +00:00
Anton Romanov
c79d5f838c crosvm: crosvm_control: use OUT_DIR instead of CARGO_TARGET_DIR in build script
CARGO_TARGET_DIR is not meant to be used in build scripts as that is an
optional variable that *may* be passed to cargo. The one that is set by
cargo itself is OUT_DIR and is always present to specify where build
scripts are expected to place output

BUG=none
TEST=cq

Change-Id: I118eebf914dbefd93f2cafb6950c7a6b4c01c574
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3598239
Auto-Submit: Anton Romanov <romanton@google.com>
Reviewed-by: Kameron Lutes <kalutes@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Anton Romanov <romanton@google.com>
2022-04-20 23:05:48 +00:00
Keiichi Watanabe
25d7911e8d crosvm_control: Minor style fix
BUG=none
TEST=cargo chekc

Change-Id: I24fa7eced9053eee535778153390f4039044e47f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3581447
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Kameron Lutes <kalutes@chromium.org>
2022-04-20 19:33:30 +00:00
Kameron Lutes
1904e141b7 Reland "crosvm_control: Generate C header during build"
This is a reland of commit 06fca32aff

Original change's description:
> crosvm_control: Generate C header during build
>
> Generates a C header for the crosvm_control library during crosvm build.
>
> BUG=b:188858559
> TEST=cq
>
> Cq-Depend: chromium:3553666
> Change-Id: Ic6d57d654f546a4ddf9facad16d29a03c103ebbe
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3553761
> Reviewed-by: Dennis Kempin <denniskempin@google.com>
> Tested-by: kokoro <noreply+kokoro@google.com>
> Commit-Queue: Kameron Lutes <kalutes@chromium.org>

Bug: b:188858559
Change-Id: I041cf6452ecec2d3ef9581b07ee0c457ba81cf98
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3593855
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Kameron Lutes <kalutes@chromium.org>
2022-04-20 18:29:20 +00:00
Junichi Uekawa
835bfc3cfa Revert "crosvm_control: Generate C header during build"
This reverts commit 06fca32aff.

Reason for revert: cros side dependency is not there yet

Original change's description:
> crosvm_control: Generate C header during build
>
> Generates a C header for the crosvm_control library during crosvm build.
>
> BUG=b:188858559
> TEST=cq
>
> Cq-Depend: chromium:3553666
> Change-Id: Ic6d57d654f546a4ddf9facad16d29a03c103ebbe
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3553761
> Reviewed-by: Dennis Kempin <denniskempin@google.com>
> Tested-by: kokoro <noreply+kokoro@google.com>
> Commit-Queue: Kameron Lutes <kalutes@chromium.org>

Bug: b:188858559
Change-Id: I34a2d970415f95f559678520901340c1d8e6297a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3581450
Auto-Submit: Junichi Uekawa <uekawa@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-04-14 12:48:22 +00:00
Kameron Lutes
06fca32aff crosvm_control: Generate C header during build
Generates a C header for the crosvm_control library during crosvm build.

BUG=b:188858559
TEST=cq

Cq-Depend: chromium:3553666
Change-Id: Ic6d57d654f546a4ddf9facad16d29a03c103ebbe
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3553761
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Kameron Lutes <kalutes@chromium.org>
2022-04-13 23:37:32 +00:00
Daniel Verkamp
f35f636cc5 Rust 1.60 clippy fixes
BUG=None
TEST=tools/presubmit # with rust-toolchain updated to 1.60.0

Change-Id: I5772e8b0593f8d92003e93aeb2145e87610abe2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3577332
Reviewed-by: Anton Romanov <romanton@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-04-11 20:40:36 +00:00
Dennis Kempin
ef516189db Refactoring: Move common/base into base
Executes the script in https://crrev.com/c/3530502

BUG=b:223206469
TEST=presubmit

Change-Id: Ibeffdc8de0b2270f070e60bb2de8d9fdc78a2a6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3530503
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-03-17 00:01:27 +00:00
Anton Romanov
bed40ad547 crosvm: migrate to Rust 2021 edition
BUG=none
TEST=cq

Change-Id: I0059c970879b78bfd40b6ce58b10debcf154b50f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3508322
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Anton Romanov <romanton@google.com>
2022-03-09 01:16:03 +00:00
Vikram Auradkar
ae5118f5c7 Enable windows tests for a few crates
Run tests for sys_util_core, poll_token_derive and balloon_control on
windows.

Using dotfiles to disable/serialize test runs of a subset of crates does
not work well with third party crates as it forces us to commit the dot
file to the crate.

The patch modifies and uses the script that runs linux tests.
This patch also allows us to
- build/test child crate even if parent crate has disabled build/test.
- avoid building crosvm if it is not explicitly specified.

RIP short lived .windows_build_test_skip. You allowed us to run noop
kokoro tests.

Test: py .\tools\impl\test_runner.py --arch x86_64
Bug: b:215610772
Change-Id: Icc6d04ffd7c0c33d4f60aeac16fc7d23881c387d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3459809
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
2022-02-18 03:18:58 +00:00
Vikram Auradkar
0108238474 Upstream windows build/test script
The patch also adds files to skip building and testing crates on
windows. When we run
```
tools/windows/build_test.py --skip_file_name .windows_build_test_skip
```

the build/test succeeds without actually doing anything as build/test
for all crates is skipped by creating '.windows_build_test_skip'.

Bug: 213170957
Test: Ran script on downstream repo
Change-Id: Iebd2cea463ee722be4feaed88229e1fb5e9fd6c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3417918
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
2022-01-28 00:55:08 +00:00
ameron Lutes
cde1b5416f crosvm: Rename libcrosvm_control to crosvm_control
The current inclusion of the 'lib' prefix is redundant and results
in 'liblibcrosvm_control' once built.

These changes remove the 'lib' prefix from the source files.

BUG=b:188858559
TEST=cros_run_unit_tests --board ${board} --packages chromeos-base/crosvm

Change-Id: Ic1bcdce9aa5d879f5867232ffec60f40fe57d3a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3321731
Reviewed-by: Hikaru Nishida <hikalium@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Christian Blichmann <cblichmann@google.com>
Commit-Queue: Kameron Lutes <kalutes@chromium.org>
2021-12-14 18:38:42 +00:00