cargo-kcov is broken on rust versions >=1.71.0. This is currently
blocking us from upgrading to the new toolchain version (1.72.0), which
is required to compile linux-loader (due to one dependency having a MSRV
policy of "N-2", meaning our current toolchain is no longer supported).
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
There are quite a few, genuine useful cases where one wants to overflow
the recommended 75 (some use 72) character rule.
Breaking long lines or manually breaking long compiler or other
tool-generated outputs is just confusing and error-prone.
This does not mean that we should stop wrapping manually written text
at a sane length, but enforcing the rule with a script seems to yield
questionable results while creating quite a bit of friction.
Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
When the coverage changes, we raise exceptions with simple strings,
this causes the following error:
TypeError: exceptions must derive from BaseException
Let's use derivatives of BaseException to fix this issue.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
This version contains an updated rust toolchain (1.68.2 -> 1.69.0), as
well as the miri component for the nightly toolchain.
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
This revision contains critcmp and cargo-audit on ARM again, after the
previous revision was lacking them due to an OOM at container build
time.
Closes#123
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
That updates to a newer version of Rust, 1.68.2, and adds back
libclang-dev package which is required by vhost-device/gpio crates.
An earlier version, v20, is skipped here as we missed updating
rust-vmm-ci along with it. v20 updated documentation and triggered
builds for changes in build_container.sh.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
There should be no changes required in the crates. The only
difference is in the libgpio library, as we're using a release
and not a certain commit on the main branch.
This is the first container built with the automation, and in
the process we had to do some significant cleanup to remove
things that were not needed. Hopefully this will not trigger
any errors in the CIs.
Signed-off-by: Andreea Florescu <fandree@amazon.com>
This container version updates the Rust version to 1.67.1, the base
Ubuntu image to 22.04 (which is the newest that still works with
kcov), and adds the gpio library needed by the vhost-device tests.
Signed-off-by: Andreea Florescu <fandree@amazon.com>
By default we are now using the kvm hypervisor in tests.
This can be overritten for the entire pipeline at the pipeline
level by using the environment variable `AGENT_TAG_HYPERVISOR`.
Fixes: https://github.com/rust-vmm/rust-vmm-ci/issues/115
Signed-off-by: Andreea Florescu <fandree@amazon.com>
Without this fix, yml is generated wrongly like below:
steps:
- label: coverage-x86_64
command: pytest $(find . -type f -name "test_coverage.py")
retry:
automatic: false
agents:
os: linux
platform: x86_64.metal
hypervisor: mshv
plugins:
- docker#v3.8.0:
image: rustvmm/dev:v16
always-pull: true
privileged: true
timeout_in_minutes: 5
hypervisor: mshv // This is now right
Signed-off-by: Muminul Islam <muislam@microsoft.com>
In order to support Microsoft Hypervisor, this tag is used
to identify agents that has MSHV support
Signed-off-by: Muminul Islam <muislam@microsoft.com>
This is needed so we can have separate queues for tests that require
special instances. For example, running performance tests require
nothing else to run at the same time.
Signed-off-by: Andreea Florescu <fandree@amazon.com>
Any keys in the input JSON that we do not recognize we are adding
as they are to the output pipeline. This is needed so that we don't
have to always update the autogeneration script for each new Buildkite
configuration that we want to support.
Signed-off-by: Andreea Florescu <fandree@amazon.com>
In the script for autogenerating the rust-vmm-ci tests, we were using
self directly for setting the configuration of the tests, and then
we were returning vars(self). This was a pretty obfuscated way of
returning a JSON, so instead we're now just explicitly declaring
a dictionary as part of self, and returning that instead. This
is needed for future extensions as well as we want to be able to
extend the tool such that it supports any keys from the input
to be passed as they are so that we don't need to keep changing it
whenever we need to add support for another Buildkite configuration
parameter.
Signed-off-by: Andreea Florescu <fandree@amazon.com>
We already have this as a requirement for merging PRs as part of the
PR checklist template, but it's better to enforce it. This comes with
the disadvantage that we will need to update all comments and add the
prefix "SAFETY: " as required by the clippy check.
Signed-off-by: Andreea Florescu <fandree@amazon.com>
Before this patch the timeout could only be overwritten in the
TIMEOUT environment variable. While that approach works and it
is still needed so we can set a different timeout depending
on the repository on which we run the pipeline, we also need a
way to easily set a different timeout in custom tests. This
comes handy when we have custom pipeline for certain crates
and we want to be able to easily specify a timeout in a
more human readable way.
Signed-off-by: Andreea Florescu <fandree@amazon.com>
With newer versions of git we need to add an exception
for the `workdir` which is owned by a different user
then the one that is running the git commands.
Signed-off-by: Andreea Florescu <fandree@amazon.com>
The newer versions of git are checking the ownership of directories.
Since the `/workdir` is a shared directory with ownership of buildkite,
we need to add an exception for it.
Signed-off-by: Andreea Florescu <fandree@amazon.com>
Expand the title and changelog description lines to 60 and 75
respectively. That is in line with what other projects do and
allows for better narratives.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Instead of accounting for any difference in coverage, only fail the test
if the difference between the current coverage and the new coverage is
higher than 0.5%.
Signed-off-by: Andreea Florescu <fandree@amazon.com>
The test was assuming that we always want to run all the tests in an
workspace, but that is not the case when we have multiple crates that we
want to publish part of the same workspace.
To address this issue, we can now select to run the coverage test only
on the crate in scope. This can be achieved by passing the parameter
`--test-scope` with the value "crate". By default, tests are still
running as a workspace so that we do not need to update all the other
rust-vmm components that were counting on this feature.
The `test-scope` option can also be reused in other tests that are
making use of `--all`. For example, cargo build.
Signed-off-by: Andreea Florescu <fandree@amazon.com>
Add the RUSTFLAGS="-D warnings" to cargo build
commands
The yaml config file has been deleted in the meantime,
so we need to add this again.
Signed-off-by: alindima <alindima@amazon.com>
Included the new environment variable `TIMEOUTS_MIN` for overriding
step timeouts and updated the "Custom Pipeline" section to
reflect that we are also autogenerating the custom pipelines.
Signed-off-by: Catalin Dumitru <catdum@amazon.com>
Added a default timeout value for each Buildkite step that can be
overridden through the environment variable `TIMEOUTS_MIN`.
Signed-off-by: Catalin Dumitru <catdum@amazon.com>
The use of the static file pipeline.yml is now deprecated. All
pipelines should use the dynamic script autogenerate_pipeline.py.
Signed-off-by: Catalin Dumitru <catdum@amazon.com>
Added the option --all-targets to the command in the clippy test for
clippy to also run on the integration tests.
Signed-off-by: Catalin Dumitru <catdum@amazon.com>
Added help options -h, --help for the script that autogenerates
the pipeline and for the one that runs the tests locally. In the
former, replaced the module optparse (which is now deprecated)
with the module argparse.
Signed-off-by: Catalin Dumitru <catdum@amazon.com>