Skip to content

Commit

Permalink
svsm: remove default-test feature
Browse files Browse the repository at this point in the history
This feature is not really needed, as we can detect if we're building
tests via the "test" cfg.

Signed-off-by: Carlos López <carlos.lopez@suse.com>
  • Loading branch information
00xc committed May 14, 2024
1 parent cd8c90f commit 85e5a86
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FEATURES ?= "default"
SVSM_ARGS = --features ${FEATURES}

FEATURES_TEST ?= "default-test"
SVSM_ARGS_TEST = --no-default-features --features ${FEATURES_TEST}
SVSM_ARGS_TEST = --no-default-features
ifdef FEATURES_TEST
SVSM_ARGS_TEST += --features ${FEATURES_TEST}
endif

ifdef RELEASE
TARGET_PATH=release
Expand Down
1 change: 0 additions & 1 deletion kernel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ test.workspace = true

[features]
default = ["mstpm"]
default-test = []
enable-gdb = ["dep:gdbstub", "dep:gdbstub_arch"]
mstpm = ["dep:libmstpm"]

Expand Down
4 changes: 1 addition & 3 deletions kernel/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ fn main() {
println!("cargo:rustc-link-arg-bin=svsm=--no-relax");
println!("cargo:rustc-link-arg-bin=svsm=-Tkernel/src/svsm.lds");
println!("cargo:rustc-link-arg-bin=svsm=-no-pie");
if std::env::var("CARGO_FEATURE_MSTPM").is_ok()
&& std::env::var("CARGO_FEATURE_DEFAULT_TEST").is_err()
{
if std::env::var("CARGO_FEATURE_MSTPM").is_ok() && std::env::var("CARGO_CFG_TEST").is_err() {
println!("cargo:rustc-link-arg-bin=svsm=-Llibmstpm");
println!("cargo:rustc-link-arg-bin=svsm=-lmstpm");
}
Expand Down

0 comments on commit 85e5a86

Please sign in to comment.