From ac45574fa06a6119375c49d8146fb17fda5b0436 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 25 Jan 2024 16:32:21 +0000 Subject: [PATCH 1/3] scripts: Run integration tests in series The GitHub hosted runners do not have sufficient storage space to run all the tests in parallel - instead run the tests in series. This has only a marginal impact on the total CI cycle time. Signed-off-by: Rob Bradford --- scripts/run_coreboot_integration_tests.sh | 2 +- scripts/run_integration_tests.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/run_coreboot_integration_tests.sh b/scripts/run_coreboot_integration_tests.sh index 96cc6f7c..1106a023 100755 --- a/scripts/run_coreboot_integration_tests.sh +++ b/scripts/run_coreboot_integration_tests.sh @@ -26,4 +26,4 @@ make -C $COREBOOT_DIR olddefconfig make -C $COREBOOT_DIR -j"$(nproc)" export RUST_BACKTRACE=1 -cargo test --features "coreboot integration_tests" "integration::tests::linux::$arch" +cargo test --features "coreboot integration_tests" "integration::tests::linux::$arch" -- --test-threads=1 diff --git a/scripts/run_integration_tests.sh b/scripts/run_integration_tests.sh index f52616d3..73fdc658 100755 --- a/scripts/run_integration_tests.sh +++ b/scripts/run_integration_tests.sh @@ -21,4 +21,4 @@ rustup component add rust-src cargo build --release --target "$target.json" -Zbuild-std=core,alloc -Zbuild-std-features=compiler-builtins-mem export RUST_BACKTRACE=1 -time cargo test --features "integration_tests" "integration::tests::linux::$arch" +time cargo test --features "integration_tests" "integration::tests::linux::$arch" -- --test-threads=1 From 0edb2240677cff14e0ab96d8ed21384ca64e5bab Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 25 Jan 2024 15:58:51 +0000 Subject: [PATCH 2/3] ci: Run unit & integration tests on GitHub runner The GitHub hosted runners now support running nested VMs so this can be used over the Jenkins setup for a smoother CI experience. Signed-off-by: Rob Bradford --- .github/workflows/tests.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/tests.yaml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 00000000..6d8aaba8 --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,20 @@ +name: Rust Hypervisor Firmware Tests +on: [pull_request, create] + +jobs: + build: + name: Tests + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + steps: + - name: Code checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Run unit tests + run: scripts/dev_cli.sh tests --unit + - name: Run integration tests + run: scripts/dev_cli.sh tests --integration + - name: Run integration tests + run: scripts/dev_cli.sh tests --integration-coreboot \ No newline at end of file From 70d0dd192048a8664dce110388390aaf59fbfd5d Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 25 Jan 2024 17:52:15 +0000 Subject: [PATCH 3/3] ci: Remove x86-64 Linux tests from Jenkinsfile Signed-off-by: Rob Bradford --- Jenkinsfile | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index be0a0d5d..89264c51 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,37 +3,6 @@ pipeline { stages { stage ('Build') { parallel { - stage ('Linux guest Tests') { - agent { node { label 'focal-fw' } } - stages { - stage ('Checkout') { - steps { - checkout scm - } - } - stage('Run unit tests') { - steps { - sh "scripts/dev_cli.sh tests --unit" - } - } - stage('Run integration tests') { - options { - timeout(time: 1, unit: 'HOURS') - } - steps { - sh "scripts/dev_cli.sh tests --integration" - } - } - stage('Run coreboot integration tests') { - options { - timeout(time: 1, unit: 'HOURS') - } - steps { - sh "scripts/dev_cli.sh tests --integration-coreboot" - } - } - } - } stage ('Windows guest Tests') { agent { node { label 'focal-fw' } } environment {