From c163d25be3d7565e2a5769316581f800a1189fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20L=C3=B3pez?= Date: Tue, 26 Mar 2024 22:51:23 +0100 Subject: [PATCH] Makefile: respect CARGO_ARGS when running tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the already existing CARGO_ARGS in the Makefile when running tests, as there are situations where one may want to pass additional flags to "cargo test", like building the tests in release mode. Signed-off-by: Carlos López --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9789bda74..618c4f449 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ bin/coconut-test-qemu.igvm: $(IGVMBUILDER) $(IGVMMEASURE) bin/test-kernel.elf b $(IGVMMEASURE) $@ test: - cargo test --workspace --target=x86_64-unknown-linux-gnu + cargo test ${CARGO_ARGS} --workspace --target=x86_64-unknown-linux-gnu test-in-svsm: utils/cbit bin/coconut-test-qemu.igvm ./scripts/test-in-svsm.sh @@ -102,7 +102,7 @@ bin/svsm-kernel.elf: bin objcopy -O elf64-x86-64 --strip-unneeded ${SVSM_KERNEL_ELF} $@ bin/test-kernel.elf: bin - LINK_TEST=1 cargo +nightly test -p svsm --config 'target.x86_64-unknown-none.runner=["sh", "-c", "cp $$0 ../${TEST_KERNEL_ELF}"]' + LINK_TEST=1 cargo +nightly test ${CARGO_ARGS} -p svsm --config 'target.x86_64-unknown-none.runner=["sh", "-c", "cp $$0 ../${TEST_KERNEL_ELF}"]' objcopy -O elf64-x86-64 --strip-unneeded ${TEST_KERNEL_ELF} bin/test-kernel.elf ${FS_BIN}: bin