mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-27 03:13:23 +00:00
Add cfg(ktest)
as a well-known configuration
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
ab1d931cb7
commit
8633893bb9
@ -24,6 +24,12 @@ pub fn execute_forwarded_command(subcommand: &str, args: &Vec<String>) -> ! {
|
||||
cargo.arg("--target").arg(get_default_arch().triple());
|
||||
}
|
||||
cargo.args(args);
|
||||
|
||||
let env_rustflags = std::env::var("RUSTFLAGS").unwrap_or_default();
|
||||
let rustflags = env_rustflags + " --check-cfg cfg(ktest)";
|
||||
|
||||
cargo.env("RUSTFLAGS", rustflags);
|
||||
|
||||
let status = cargo.status().expect("Failed to execute cargo");
|
||||
std::process::exit(status.code().unwrap_or(1));
|
||||
}
|
||||
|
Reference in New Issue
Block a user