diff --git a/.sync/rust/Makefiles/Makefile-patina-dxe-core-qemu.toml b/.sync/rust/Makefiles/Makefile-patina-dxe-core-qemu.toml index 4ece904..51aca24 100644 --- a/.sync/rust/Makefiles/Makefile-patina-dxe-core-qemu.toml +++ b/.sync/rust/Makefiles/Makefile-patina-dxe-core-qemu.toml @@ -174,11 +174,23 @@ clear = true run_task = [{ name = ["check-no-default-features-code", "check-no-default-features-tests"], parallel = true }] [tasks.test] -description = "Runs tests via cargo-nextest. Example `cargo make test` or `cargo make test -p package_name -- --nocapture`." +description = "Runs tests via cargo-nextest. Example `cargo make test` or `cargo make test -p package_name -- --nocapture`. In CI, also runs a second pass with the `ci_features` feature enabled to ensure tests do not depend on it being enabled." clear = true +dependencies = ["test-default", "test-ci-features"] + +[tasks.test-default] +description = "Runs tests via cargo-nextest with default features." +private = true command = "cargo" args = ["nextest", "run", "@@split(CARGO_MAKE_TASK_ARGS,;)"] +[tasks.test-ci-features] +description = "Runs tests via cargo-nextest with the `ci_features` feature enabled. Only runs when the `CI` environment variable is set." +private = true +condition = { env_set = ["CI"] } +command = "cargo" +args = ["nextest", "run", "--features", "ci_features", "@@split(CARGO_MAKE_TASK_ARGS,;)"] + [tasks.coverage-collect] description = "Run tests and collect coverage data without generating reports." install_crate = false @@ -207,8 +219,8 @@ command = "cargo" args = ["llvm-cov", "report", "--html", "--output-dir", "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/target/coverage"] [tasks.coverage] -description = "Build and run all tests and calculate coverage (runs test once and generates LCOV and HTML reports)." -dependencies = ["coverage-collect", "coverage-lcov", "coverage-html"] +description = "Build and run all tests and calculate coverage (runs test once and generates LCOV and HTML reports). In CI, also runs a second pass with the `ci_features` feature enabled (outside of coverage collection) since only `cargo make coverage` is run in CI." +dependencies = ["coverage-collect", "coverage-lcov", "coverage-html", "test-ci-features"] clear = true [tasks.test-asan] diff --git a/.sync/rust/Makefiles/Makefile-patina-mtrr.toml b/.sync/rust/Makefiles/Makefile-patina-mtrr.toml index b5e2443..a7ad540 100644 --- a/.sync/rust/Makefiles/Makefile-patina-mtrr.toml +++ b/.sync/rust/Makefiles/Makefile-patina-mtrr.toml @@ -188,11 +188,23 @@ command = "cargo" args = ["llvm-cov", "clean", "--workspace"] [tasks.test] -description = "Runs tests via cargo-nextest. Example `cargo make test` or `cargo make test -- --nocapture`" +description = "Runs tests via cargo-nextest. Example `cargo make test` or `cargo make test -- --nocapture`. In CI, also runs a second pass with the `ci_features` feature enabled to ensure tests do not depend on it being enabled." clear = true +dependencies = ["test-default", "test-ci-features"] + +[tasks.test-default] +description = "Runs tests via cargo-nextest with default features." +private = true command = "cargo" args = ["nextest", "run", "@@split(CARGO_MAKE_TASK_ARGS,;)"] +[tasks.test-ci-features] +description = "Runs tests via cargo-nextest with the `ci_features` feature enabled. Only runs when the `CI` environment variable is set." +private = true +condition = { env_set = ["CI"] } +command = "cargo" +args = ["nextest", "run", "--features", "ci_features", "@@split(CARGO_MAKE_TASK_ARGS,;)"] + [tasks.test-cov] description = "Run tests and collect coverage data without generating reports." install_crate = false @@ -221,8 +233,8 @@ command = "cargo" args = ["llvm-cov", "report", "--html", "--output-dir", "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/target/coverage"] [tasks.coverage] -description = "Build and run all tests and calculate coverage (runs test once and generates LCOV and HTML reports)." -dependencies = ["test-cov", "coverage-lcov", "coverage-html"] +description = "Build and run all tests and calculate coverage (runs test once and generates LCOV and HTML reports). In CI, also runs a second pass with the `ci_features` feature enabled (outside of coverage collection) since only `cargo make coverage` is run in CI." +dependencies = ["test-cov", "coverage-lcov", "coverage-html", "test-ci-features"] clear = true [tasks.test-asan] diff --git a/.sync/rust/Makefiles/Makefile-patina-paging.toml b/.sync/rust/Makefiles/Makefile-patina-paging.toml index 80846e1..740e03f 100644 --- a/.sync/rust/Makefiles/Makefile-patina-paging.toml +++ b/.sync/rust/Makefiles/Makefile-patina-paging.toml @@ -180,11 +180,23 @@ command = "cargo" args = ["llvm-cov", "clean", "--workspace"] [tasks.test] -description = "Runs tests via cargo-nextest. Example `cargo make test` or `cargo make test -- --nocapture`." +description = "Runs tests via cargo-nextest. Example `cargo make test` or `cargo make test -- --nocapture`. In CI, also runs a second pass with the `ci_features` feature enabled to ensure tests do not depend on it being enabled." clear = true +dependencies = ["test-default", "test-ci-features"] + +[tasks.test-default] +description = "Runs tests via cargo-nextest with default features." +private = true command = "cargo" args = ["nextest", "run", "@@split(CARGO_MAKE_TASK_ARGS,;)"] +[tasks.test-ci-features] +description = "Runs tests via cargo-nextest with the `ci_features` feature enabled. Only runs when the `CI` environment variable is set." +private = true +condition = { env_set = ["CI"] } +command = "cargo" +args = ["nextest", "run", "--features", "ci_features", "@@split(CARGO_MAKE_TASK_ARGS,;)"] + [tasks.test-cov] description = "Run tests and collect coverage data without generating reports." install_crate = false @@ -213,8 +225,8 @@ command = "cargo" args = ["llvm-cov", "report", "--html", "--output-dir", "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/target/coverage"] [tasks.coverage] -description = "Build and run all tests and calculate coverage (runs test once and generates LCOV and HTML reports)." -dependencies = ["test-cov", "coverage-lcov", "coverage-html"] +description = "Build and run all tests and calculate coverage (runs test once and generates LCOV and HTML reports). In CI, also runs a second pass with the `ci_features` feature enabled (outside of coverage collection) since only `cargo make coverage` is run in CI." +dependencies = ["test-cov", "coverage-lcov", "coverage-html", "test-ci-features"] clear = true [tasks.test-asan] diff --git a/.sync/rust/Makefiles/Makefile-patina-readiness-tool.toml b/.sync/rust/Makefiles/Makefile-patina-readiness-tool.toml index 8a2177f..7d5731c 100644 --- a/.sync/rust/Makefiles/Makefile-patina-readiness-tool.toml +++ b/.sync/rust/Makefiles/Makefile-patina-readiness-tool.toml @@ -243,16 +243,28 @@ command = "cargo" args = ["llvm-cov", "report", "--html", "--output-dir", "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/target/coverage"] [tasks.coverage] -description = "Build and run all tests and calculate coverage (runs test once and generates LCOV and HTML reports)." -dependencies = ["coverage-test", "coverage-lcov", "coverage-html"] +description = "Build and run all tests and calculate coverage (runs test once and generates LCOV and HTML reports). In CI, also runs a second pass with the `ci_features` feature enabled (outside of coverage collection) since only `cargo make coverage` is run in CI." +dependencies = ["coverage-test", "coverage-lcov", "coverage-html", "test-ci-features"] clear = true [tasks.test] -description = "Runs tests via cargo-nextest. Example `cargo make test` or `cargo make test -p dxe_readiness_validator -- --nocapture`." +description = "Runs tests via cargo-nextest. Example `cargo make test` or `cargo make test -p dxe_readiness_validator -- --nocapture`. In CI, also runs a second pass with the `ci_features` feature enabled to ensure tests do not depend on it being enabled." clear = true +dependencies = ["test-default", "test-ci-features"] + +[tasks.test-default] +description = "Runs tests via cargo-nextest with default features." +private = true command = "cargo" args = ["nextest", "run", "@@split(CARGO_MAKE_TASK_ARGS,;)"] +[tasks.test-ci-features] +description = "Runs tests via cargo-nextest with the `ci_features` feature enabled. Only runs when the `CI` environment variable is set." +private = true +condition = { env_set = ["CI"] } +command = "cargo" +args = ["nextest", "run", "--features", "ci_features", "@@split(CARGO_MAKE_TASK_ARGS,;)"] + [tasks.test-asan] description = "Run tests with AddressSanitizer enabled. Example `cargo make test-asan`. Use `cargo make test-asan --print-dll-path` to print the ASan runtime DLL directory." clear = true diff --git a/.sync/rust/Makefiles/Makefile-patina.toml b/.sync/rust/Makefiles/Makefile-patina.toml index bb1e7e2..f87dda9 100644 --- a/.sync/rust/Makefiles/Makefile-patina.toml +++ b/.sync/rust/Makefiles/Makefile-patina.toml @@ -238,11 +238,23 @@ command = "cargo" args = ["llvm-cov", "clean", "--workspace"] [tasks.test] -description = "Runs tests via cargo-nextest. Example `cargo make test` or `cargo make test -p package_name -- --nocapture`." +description = "Runs tests via cargo-nextest. Example `cargo make test` or `cargo make test -p package_name -- --nocapture`. In CI, also runs a second pass with the `ci_features` feature enabled to ensure tests do not depend on it being enabled." clear = true +dependencies = ["test-default", "test-ci-features"] + +[tasks.test-default] +description = "Runs tests via cargo-nextest with default features." +private = true command = "cargo" args = ["nextest", "run", "@@split(CARGO_MAKE_TASK_ARGS,;)"] +[tasks.test-ci-features] +description = "Runs tests via cargo-nextest with the `ci_features` feature enabled. Only runs when the `CI` environment variable is set." +private = true +condition = { env_set = ["CI"] } +command = "cargo" +args = ["nextest", "run", "--features", "ci_features", "@@split(CARGO_MAKE_TASK_ARGS,;)"] + [tasks.test-ignored] description = "Runs ignored tests with native cargo test behavior. Example `cargo make test-ignored` or `cargo make test-ignored -p package_name" clear = true @@ -381,8 +393,8 @@ command = "cargo" args = ["llvm-cov", "report", "--html", "--output-dir", "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/target/coverage"] [tasks.coverage] -description = "Build and run all tests and calculate coverage (runs test once and generates LCOV and HTML reports)." -dependencies = ["test-cov", "test-cov-fallback", "coverage-lcov", "coverage-html"] +description = "Build and run all tests and calculate coverage (runs test once and generates LCOV and HTML reports). In CI, also runs a second pass with the `ci_features` feature enabled (outside of coverage collection) since only `cargo make coverage` is run in CI." +dependencies = ["test-cov", "test-cov-fallback", "coverage-lcov", "coverage-html", "test-ci-features"] clear = true [tasks.build-aarch64]