diff --git a/README.md b/README.md index 87b7e41..84111f3 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ To run the integration tests defined in the pipeline as part of the CI: ```bash # Add rust-vmm-ci as a submodule. This will point to the latest rust-vmm-ci -# commit from the master branch. The following command will also add a +# commit from the main branch. The following command will also add a # `.gitmodules` file and the `rust-vmm-ci` to the index. git submodule add https://github.com/rust-vmm/rust-vmm-ci.git # Commit the changes to your repository so that the CI can run using the @@ -51,7 +51,7 @@ to the repository as well. 3. Create a new pipeline definition in Buildkite. For this step ask one of the rust-vmm Buildkite [admins](CODEOWNERS) to create one for you. The process is explained -[here](https://github.com/rust-vmm/community/blob/master/docs/maintainers/setup_new_repo.md#set-up-ci). +[here](https://github.com/rust-vmm/community/blob/main/docs/maintainers/setup_new_repo.md#set-up-ci). 4. There is a script that autogenerates a dynamic Buildkite pipeline. To run the CI using this dynamic pipeline, you need to add a step that is uploading @@ -226,7 +226,7 @@ than the coverage reported in [tests/coverage](tests/coverage). `rust-vmm-ci` includes an integration test that can run a battery of benchmarks at every pull request, comparing the results with the tip of the -upstream `master` branch. The test is not included in the default Buildkite +upstream `main` branch. The test is not included in the default Buildkite pipeline. Each crate that requires the test to be run as part of the CI must add a [custom pipeline](#custom-pipeline). @@ -271,9 +271,9 @@ cargo bench [--all-features] OR [--features ] `rust-vmm-ci` uses [`critcmp`](https://github.com/BurntSushi/critcmp) to compare the results yielded by `cargo bench --all-features` on the PR being -tested with those from the tip of the upstream `master` branch. The test +tested with those from the tip of the upstream `main` branch. The test runs `cargo bench` twice, once on the current `HEAD`, then again after -`git checkout origin/master`. `critcmp` takes care of the comparison, making +`git checkout origin/main`. `critcmp` takes care of the comparison, making use of `criterion`'s stable format for [output files](https://bheisler.github.io/criterion.rs/book/user_guide/csv_output.html). The results are printed to `stdout` and can be visually inspected in the @@ -316,7 +316,7 @@ cd vm-superio Known issues: - When running the `cargo-audit` test, the following error may occur: ``` -test_cargo-audit (__main__.TestsContainer) ... error: couldn’t fetch advisory database: git operation failed: reference ‘refs/heads/master’ not found; class=Reference (4); code=NotFound (-3) +test_cargo-audit (__main__.TestsContainer) ... error: couldn’t fetch advisory database: git operation failed: reference ‘refs/heads/main’ not found; class=Reference (4); code=NotFound (-3) ``` A fix for this is to remove `~/.cargo/advisory-db` in the container, and then rerun `test_run.py`: ``` diff --git a/integration_tests/test_benchmark.py b/integration_tests/test_benchmark.py index 12a4c82..5e375a0 100644 --- a/integration_tests/test_benchmark.py +++ b/integration_tests/test_benchmark.py @@ -5,7 +5,7 @@ Compare benchmark results before and after a pull request. This test works properly on the local machine only when the environment variables REMOTE and BASE_BRANCH are set. Otherwise the default values -are "origin" for the remote name of the upstream repository and "master" +are "origin" for the remote name of the upstream repository and "main" for the name of the base branch, and this test may not work as expected. """ @@ -21,7 +21,7 @@ REMOTE = \ BASE_BRANCH = \ os.environ.get('BUILDKITE_PULL_REQUEST_BASE_BRANCH') or \ os.environ.get('BASE_BRANCH') or \ - "master" + "main" # File used for saving the results of cargo bench # when running on the PR branch. PR_BENCH_RESULTS_FILE = "pr_bench_results" @@ -62,7 +62,7 @@ def test_bench(): # exist. Hopefully it will be possible to check it in another way # ...soon print( - "There are no benchmarks in master. No comparison can happen." + "There are no benchmarks in main. No comparison can happen." ) else: assert return_code == 0, "stdout: {}\n stderr: {}".format( diff --git a/integration_tests/test_commit_format.py b/integration_tests/test_commit_format.py index 72a3b01..e0ee4d8 100644 --- a/integration_tests/test_commit_format.py +++ b/integration_tests/test_commit_format.py @@ -5,7 +5,7 @@ Test the commit message format. This test works properly on the local machine only when the environment variables REMOTE and BASE_BRANCH are set. Otherwise the default values -are "origin" for the remote name of the upstream repository and "master" +are "origin" for the remote name of the upstream repository and "main" for the name of the base branch, and this test may not work as expected. """ @@ -23,7 +23,7 @@ REMOTE = \ BASE_BRANCH = \ os.environ.get('BUILDKITE_PULL_REQUEST_BASE_BRANCH') or \ os.environ.get('BASE_BRANCH') or \ - "master" + "main" def test_commit_format(): diff --git a/test_run.py b/test_run.py index 600637c..bd7eb64 100755 --- a/test_run.py +++ b/test_run.py @@ -40,7 +40,7 @@ if __name__ == '__main__': The tests "test_benchmark.py" and "test_commit_format.py" work properly on the local machine only when the environment variables REMOTE and BASE_BRANCH are set. Otherwise the default values are "origin" for the - remote name of the upstream repository and "master" for the name of the + remote name of the upstream repository and "main" for the name of the base branch, and these tests may not work as expected. """ )