Skip to content

Commit

Permalink
readme: cosmetic changes + pipeline update
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandra Iordache <[email protected]>
  • Loading branch information
Alexandra Iordache committed Mar 5, 2020
1 parent 50005a2 commit aeee2ac
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@ cargo build
Our Continuous Integration (CI) pipeline is implemented on top of
[Buildkite](https://buildkite.com/).
For the complete list of tests, check our
[CI pipeline](https://buildkite.com/rust-vmm/vm-virtio-ci).
[CI pipeline](https://buildkite.com/rust-vmm/rust-vmm-ci).

Each individual test runs in a container. To reproduce a test locally, you can
use the dev-container on both x86 and arm64.

```bash
container_version=5
docker run -it \
--security-opt seccomp=unconfined \
--volume $(pwd):/linux-loader \
rustvmm/dev:v2
rustvmm/dev:v${container_version}
cd linux-loader/
cargo test
```
Expand All @@ -43,7 +44,7 @@ The integration tests support two test profiles:
The test profiles are applicable to tests that run using pytest. Currently only
the [coverage test](tests/test_coverage.py) follows this model as all the other
integration tests are run using the
[Buildkite pipeline](https://buildkite.com/rust-vmm/vm-virtio-ci).
[Buildkite pipeline](https://buildkite.com/rust-vmm/rust-vmm-ci).

The difference between is declaring tests as passed or failed:
- with the **devel** profile the coverage test passes if the current coverage
Expand All @@ -61,10 +62,11 @@ The line coverage is saved in [tests/coverage](tests/coverage). To update the
coverage before submitting a PR, run the coverage test:

```bash
container_version=5
docker run -it \
--security-opt seccomp=unconfined \
--volume $(pwd):/linux-loader \
rustvmm/dev:v2
rustvmm/dev:v${container_version}
cd linux-loader/
pytest --profile=devel tests/test_coverage.py
```
Expand All @@ -85,21 +87,23 @@ than the coverage reported in [tests/coverage](tests/coverage).

### bzImage test

As we don't want to distribute an entire kernel bzImage, the `load_bzImage` test is ignored by
default. In order to test the bzImage support, one needs to locally build a bzImage, copy it
to the `src/loader` directory and run cargo test:

```shell
# Assuming your linux-loader and linux-stable are both under $LINUX_LOADER
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git $LINUX_LOADER/linux-stable
$ cd linux-stable
$ make bzImage
$ cp linux-stable/arch/x86/boot/bzImage $LINUX_LOADER/linux-loader/src/loader/
$ cd $LINUX_LOADER/linux-loader
$ docker run -it \
As we don't want to distribute an entire kernel bzImage, the `load_bzImage`
test is ignored by default. In order to test the bzImage support, one needs to
locally build a bzImage, copy it to the `src/loader` directory and run
`cargo test`:

```bash
# Assuming your linux-loader and linux-stable are both under ${LINUX_LOADER}:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ${LINUX_LOADER}/linux-stable
cd linux-stable
make bzImage
cp linux-stable/arch/x86/boot/bzImage ${LINUX_LOADER}/linux-loader/src/loader/
cd ${LINUX_LOADER}/linux-loader
container_version=5
docker run -it \
--security-opt seccomp=unconfined \
--volume $(pwd):/linux-loader \
rustvmm/dev:v2
$ cd linux-loader/
$ cargo test
rustvmm/dev:v${container_version}
cd linux-loader/
cargo test
```

0 comments on commit aeee2ac

Please sign in to comment.