Commit Graph

175 Commits

Author SHA1 Message Date
Laura Loghin
bedc32bb14 Add --workspace flag to cargo check too
Without this flag, it looks like not all workspace files
are checked. You can test this by adding for example an
unused import (`use std::clone;`) in
https://github.com/rust-vmm/vmm-reference/pull/11,
file src/vmm/tests/integration_tests.rs. cargo check will
fail only if we pass `--workspace` flag too.
For clippy, this flag doesn't seem to have an obvious
effect, this should be further investigated in #21.

Signed-off-by: Laura Loghin <lauralg@amazon.com>
2020-10-08 15:18:08 +03:00
Laura Loghin
3ea5f2b1f1 improve a bit error messages for commit test
Made the messages for some error cases clearer.

Signed-off-by: Laura Loghin <lauralg@amazon.com>
2020-10-08 15:18:08 +03:00
Laura Loghin
cd90a637a3 Add support for workspace tests
Added `--workspace` flag to `cargo test` commands
because it is needed for workspace crates (an example
would be the vmm-reference).
The coverage test is already run on all tests for
workspaces too.
Fixes: #38.

Signed-off-by: Laura Loghin <lauralg@amazon.com>
2020-10-08 15:18:08 +03:00
Alexandra Iordache
9dd386c2e6 readme update: cosmetic changes
Signed-off-by: Alexandra Iordache <aghecen@amazon.com>
2020-09-25 16:09:21 +03:00
Alexandra Iordache
265df53b5c Coverage test: keep stdin open
Pytest closes stdin by default, so any processes
spawned from it won't have it. As some tests in
various rust-vmm crates might need stdin to be
open, we mock it with a (currently empty) byte
stream, which we can extend in the future.

Signed-off-by: Alexandra Iordache <aghecen@amazon.com>
2020-09-25 09:54:34 +03:00
Laura Loghin
2d3bb056ce add myself to codeowners
Signed-off-by: Laura Loghin <lauralg@amazon.com>
2020-09-24 21:34:22 +03:00
Stefan Hajnoczi
e58ea7445a Fix kcov_ouput_dir typo in test_coverage.py
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2020-08-15 20:20:09 +03:00
Stefan Hajnoczi
d62d781398 fix buildkite typos in readme
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2020-08-15 20:20:09 +03:00
Andreea Florescu
0fc8cede37 refactor test_benchmark.py
- Added defines for PR branch, result files
- Updated variables & function names to be more explicit about what
  they do

Signed-off-by: Andreea Florescu <fandree@amazon.com>
2020-07-31 11:08:50 +03:00
Andreea Florescu
741b894e28 checkout to PR branch before finishing test_bench
This cleanup is needed because otherwise all subsequent tests are
going to run on the master branch.

Fixes: https://github.com/rust-vmm/rust-vmm-ci/issues/29

Signed-off-by: Andreea Florescu <fandree@amazon.com>
2020-07-31 11:08:50 +03:00
Andreea Florescu
645a5c3a74 test_bench: don't crash when no bench on master
When there are no benchmarks on the master branch, instead of
crashing first check if the error. Pass the test in case
cargo bench failed due to main bench not being present.

Fixes: https://github.com/rust-vmm/rust-vmm-ci/issues/30

Signed-off-by: Andreea Florescu <fandree@amazon.com>
2020-07-31 11:08:50 +03:00
Laura Loghin
bd32544c00 Fetch origin in benchmark test
Before running `git checkout` on the upstream
master branch, we should also fetch that branch.

Signed-off-by: Laura Loghin <lauralg@amazon.com>
2020-07-29 12:05:33 +03:00
Laura Loghin
35beb918b7 Fix commit message test
The test that was checking the commit message format
was not comparing the PR's HEAD to the right master,
even though `origin` was set to the pipeline repository.
Fixed this by fetching that repo. This way, `FETCH_HEAD`
points to the latest upstream master.

Signed-off-by: Laura Loghin <lauralg@amazon.com>
2020-07-29 12:05:33 +03:00
Alexandra Iordache
53427aa758 benchmarks: add test that can run at every PR
Related to #24

Signed-off-by: Alexandra Iordache <aghecen@amazon.com>
2020-07-23 16:17:32 +03:00
Laura Loghin
abd2c90d9f Add test for commit message format
Added test that checks if commits follow the 50/72 git
commit rule and if they are signed (git commit -s).
Fixes: #9, #14.

Signed-off-by: Laura Loghin <lauralg@amazon.com>
2020-07-23 15:27:39 +03:00
Laura Loghin
fe859f4f75 Update container image to v6
This version adds git, critcmp, cargo-audit and
cargo-license.
Also, the Rust version is updated to 1.44.1.

Signed-off-by: Laura Loghin <lauralg@amazon.com>
2020-07-23 15:27:39 +03:00
Andreea Florescu
75d725459e run cargo check on all features
Warnings should be checked by custom pipelines. The common
pipeline should check warnings on all features instead.

Signed-off-by: Andreea Florescu <fandree@amazon.com>
2020-07-21 11:07:51 +03:00
Andreea Florescu
7e3f307bf0 skip coverage-arm test
Right now this test is super unreliable and pretty much blocks every
other PR. Skip it for now until we fix kcov.

Related to: https://github.com/rust-vmm/rust-vmm-ci/issues/18

Signed-off-by: Andreea Florescu <fandree@amazon.com>
2020-05-18 10:53:15 +03:00
mrxinwang
cd7096e7a6 Enable rust-vmm coverage test in CI
1. Enabled the aarch64 coverage test in `test_coverage` script.

2. Seperated the coverage json sample file to two sample files for
different machine achitectures.

3. Updated Buildkite pipeline container version.

4. Updated README for the description of coverage files and container
version.

Signed-off-by: Henry Wang <henry.wang@arm.com>
2020-02-21 09:56:34 +01:00
Samuel Ortiz
c309d0627b buildkite: Move to the rustvmm/dev v4 container
In order to bump our CI Rust toolchain to 1.39.0.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-12-17 05:19:43 +08:00
Samuel Ortiz
c85a8da325 buildkite: Remove clippy test on aarch64
Because aarch64 is a tier-2 Rust architecture, clippy is not always
available with the latest release. Keeping the clippy tests on arrch64
prevent us from freely moving to newer Rust releases.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-12-17 05:19:43 +08:00
Andreea Florescu
bb1cd14d2c use HTTPS when adding rust-vmm-ci as a submodule
If we clone rust-vmm-ci with SSH Buildkite requires an ssh key
when cloning the repository for some reason.

Signed-off-by: Andreea Florescu <fandree@amazon.com>
2019-07-12 13:14:00 +02:00
Andreea Florescu
8b60273cef Run tests with rustvmm/dev:v3
The container now runs Rust 1.35. This is needed as versions 1.34.0
up to 1.34.2 (which is the first one to include a fix) have a security
vulnerability.

For details check the CVE: https://www.cvedetails.com/cve/CVE-2019-12083/

Signed-off-by: Andreea Florescu <fandree@amazon.com>
2019-07-01 10:50:54 +02:00
Andreea Florescu
6c471c6c3a added Buildkite pipeline and integration tests
This pipeline contains the tests that are currently run for
kvm-ioctls. The pipeline also has a step that runs the coverage
test defined in integration_tests/test_coverage.py.

The purpose of this pipeline is to be used by all rust-vmm
repositories to ensure we keep the same quality bar for all crates.

Signed-off-by: Andreea Florescu <fandree@amazon.com>
2019-06-20 18:24:38 +03:00
Andreea Florescu
61554f89d5 Initial commit 2019-05-20 16:58:04 +02:00