add coverage for target specific value
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
parent
4fd82f72ec
commit
e02957a6dc
1 changed files with 8 additions and 1 deletions
|
@ -120,6 +120,7 @@ fn override_toml() {
|
|||
"--set=change-id=1".to_owned(),
|
||||
"--set=rust.lto=fat".to_owned(),
|
||||
"--set=rust.deny-warnings=false".to_owned(),
|
||||
"--set=build.optimized-compiler-builtins=true".to_owned(),
|
||||
"--set=build.gdb=\"bar\"".to_owned(),
|
||||
"--set=build.tools=[\"cargo\"]".to_owned(),
|
||||
"--set=llvm.build-config={\"foo\" = \"bar\"}".to_owned(),
|
||||
|
@ -127,6 +128,7 @@ fn override_toml() {
|
|||
"--set=target.x86_64-unknown-linux-gnu.rpath=false".to_owned(),
|
||||
"--set=target.aarch64-unknown-linux-gnu.sanitizers=false".to_owned(),
|
||||
"--set=target.aarch64-apple-darwin.runner=apple".to_owned(),
|
||||
"--set=target.aarch64-apple-darwin.optimized-compiler-builtins=false".to_owned(),
|
||||
]),
|
||||
|&_| {
|
||||
toml::from_str(
|
||||
|
@ -167,6 +169,7 @@ runner = "x86_64-runner"
|
|||
);
|
||||
assert_eq!(config.gdb, Some("bar".into()), "setting string value with quotes");
|
||||
assert!(!config.deny_warnings, "setting boolean value");
|
||||
assert!(config.optimized_compiler_builtins, "setting boolean value");
|
||||
assert_eq!(
|
||||
config.tools,
|
||||
Some(["cargo".to_string()].into_iter().collect()),
|
||||
|
@ -193,7 +196,11 @@ runner = "x86_64-runner"
|
|||
..Default::default()
|
||||
};
|
||||
let darwin = TargetSelection::from_user("aarch64-apple-darwin");
|
||||
let darwin_values = Target { runner: Some("apple".into()), ..Default::default() };
|
||||
let darwin_values = Target {
|
||||
runner: Some("apple".into()),
|
||||
optimized_compiler_builtins: Some(false),
|
||||
..Default::default()
|
||||
};
|
||||
assert_eq!(
|
||||
config.target_config,
|
||||
[(x86_64, x86_64_values), (aarch64, aarch64_values), (darwin, darwin_values)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue