Commit graph

16 commits

Author SHA1 Message Date
Dylan Reid
1f909a21ba kokoro: Move the crosvm workdir
After trying symlinks and bind-mounts and various other shenanigans,
give up and move the crosvm working directory to a relative path that is
the same as in the chrome OS chroot.

This allows other crates in the cros checkout to find the crosvm crates
they depend on.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Change-Id: I643497f08c59328e02775ad3ac0ef9feafbf2930
Reviewed-on: https://chromium-review.googlesource.com/1436595
Commit-Ready: Chih-Yang Hsia <paulhsia@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2019-01-26 00:59:57 -08:00
Dylan Reid
1be25dc3d2 kokoro: Add a symlink to crosvm for other crates
Some crates that are needed for crosvm need crates that live inside the
crosvm directory. To allow those crates to be used, add a symlink that
allows access to the crosvm source code from a path equivalent to that
used inside the Chrome OS chroot.

In particular, the cras crate is needed by devices and devices needs the
data_model and sys_util crates. Creating a platform/crosvm directory
parallel to the third_party/adhd directory lets the build of the cras
crates find their dependencies.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Change-Id: I2a1e28638e80c8008b1ecc29c2b0b69cba1c13e2
Reviewed-on: https://chromium-review.googlesource.com/1433518
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
2019-01-24 07:43:34 -08:00
David Tolnay
5c8dae6ad7 kokoro: Avoid docker build from stdin to support COPY
Under the old command, the build would fail with:

    Step 15/25 : COPY pkgconfig/* /usr/lib/pkgconfig
    COPY failed: no source files were specified

The Docker documentation at
https://docs.docker.com/v18.03/engine/reference/builder/
explains:

    Note: If you build using STDIN (docker build - < somefile), there is
    no build context, so COPY cant be used.

TEST=it built successfully

Change-Id: I4d9fcb085009f4a47d7caecabf6eb711f5cab6b7
Reviewed-on: https://chromium-review.googlesource.com/1431356
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Tested-by: David Tolnay <dtolnay@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2019-01-24 00:51:51 -08:00
Dylan Reid
448e20b2b0 kokoro: Add adhd repo
A future change will allow crosvm to play audio through cras. To do that
it needs to use some crates that live in the adhd repository. Add the
repository to the kokoro image at a path where Cargo can find the
crates.

Change-Id: I1542090ba0db6fd0f3ac60dcc2e7bb35502a4944
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1429311
Commit-Ready: Chih-Yang Hsia <paulhsia@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
2019-01-23 10:47:34 -08:00
David Tolnay
284fcac560 kokoro: Document command for publishing image
TEST=I ran it

Change-Id: Ib34e45f9d64561e318e4fbc78758d3a0dc191e87
Reviewed-on: https://chromium-review.googlesource.com/1422682
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: David Tolnay <dtolnay@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
2019-01-19 13:27:55 -08:00
David Tolnay
68d0e7237e kokoro: Install libtpm2
Required for CL:1387624 which uses libtpm2 as a TPM simulator.

BUG=chromium:911799
TEST=build kokoro image, test master as well as TPM CL in it

Change-Id: I636be593a245ecd7ac10bc71319dee48e6511e97
Reviewed-on: https://chromium-review.googlesource.com/1419397
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Tested-by: David Tolnay <dtolnay@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
2019-01-18 00:45:57 -08:00
Daniel Verkamp
a4d5bd4bc2 kokoro: install libfdt-dev
This is needed to build CL:1370058 on x86-64 platforms.

BUG=None
TEST=Rebuild kokoro docker image and build proposed CL.

Change-Id: I86694140649eb9a2957122f8a2af35fdc4bd4faf
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1415390
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
2019-01-17 05:16:23 -08:00
David Tolnay
2bac1e7a9c toolchain: Update to Rust 1.31.0
We updated the production toolchain from 1.30 to 1.31 in CL:1366446.
This CL does the same upgrade for the local developer toolchain and
Kokoro.

The relevant changes are in rust-toolchain and kokoro/Dockerfile.
The rest are from rustfmt.

TEST=cargo fmt --all -- --check
TEST=as described in kokoro/README.md

Change-Id: I3b4913f3e237baa36c664b4953be360c09efffd4
Reviewed-on: https://chromium-review.googlesource.com/1374376
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: David Tolnay <dtolnay@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2018-12-13 19:28:04 -08:00
Jingkui Wang
b14ce22a1b crosvm: update kokoro docker file to install libusb-1.0
Usb emulation depend on libusb. This path install libusb-1.0 to the
container.

BUG=chromium:831850
TEST=local build docker and run kokoro_simulator.sh

Change-Id: I2fa406914bf7cfe9a790ec945e15eb387e964d8e
Reviewed-on: https://chromium-review.googlesource.com/1356766
Commit-Ready: Jingkui Wang <jkwang@google.com>
Tested-by: Jingkui Wang <jkwang@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2018-12-01 01:08:50 -08:00
Stephen Barber
0daffb0eb5 kokoro: add presubmit-cr.cfg
Add a kokoro build for running with Code-Review +2 labels.

BUG=none
TEST=kokoro

Change-Id: I54acf306f5de92c83f52d00e7f2c66b7cadf7e36
Reviewed-on: https://chromium-review.googlesource.com/1351216
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2018-11-27 19:14:13 -08:00
Zach Reizner
f741098251 kokoro: make output slightly more verbose
This change includes relevant toolchain versions and some echos
announcing the stages of testing. This should make kokoro's logs a bit
easier to diagnose.

TEST=kokoro_simulator.sh
BUG=None

Change-Id: I6d51d8ae6618a244338605d61882eeedcb1f5b79
Reviewed-on: https://chromium-review.googlesource.com/1324689
Commit-Ready: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
2018-11-09 07:20:06 -08:00
Daniel Verkamp
f28a864fd9 kokoro: update to Rust 1.30.0
Also add g++ to the apt package list, since minijail now requires it.

BUG=None
TEST=Rebuild Docker container and run tests

Change-Id: I3d5cee0fa626e840037ae83537bdf891b4489a49
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1307815
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2018-10-31 12:42:25 -07:00
Daniel Verkamp
ac699881f2 kokoro: add rustfmt check
Also add the standard Chromium copyright header to make the pre-submit
check happy.

BUG=None
TEST=Run manually with docker and verify it catches incorrect formatting

Change-Id: I85b7736e9efe97e56bde99eee0f23b213d3b7523
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1296984
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2018-10-25 15:19:02 -07:00
Stephen Barber
73a40e37a3 kokoro: add continuous config
BUG=none
TEST=run kokoro CI

Change-Id: If231d30581d511807a1d7a03119d3243bb0078b1
Reviewed-on: https://chromium-review.googlesource.com/1277882
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2018-10-12 18:55:03 -07:00
Zach Reizner
f55812ac20 kokoro: build and run all crosvm unit tests in docker
TEST=run kokoro presubmit
BUG=b:73822503

Change-Id: Ica341fd8a064f4deb64fecbd4277ed6cc285ef2d
Reviewed-on: https://chromium-review.googlesource.com/1236888
Commit-Ready: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
2018-09-22 01:43:12 -07:00
Stephen Barber
5abdc78c82 kokoro: add initial presubmit script and config
BUG=b:73822503
TEST=run kokoro presubmit

Change-Id: Id128de2300a76f8a359521c83b371e9b743bc71b
Reviewed-on: https://chromium-review.googlesource.com/964601
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2018-09-21 00:51:21 -07:00