Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildsys: do not track BUILDSYS_VARIANT #377

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions tools/buildsys/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use url::Url;
/// variable changes. The build type is represented with bit flags so that we can easily list
/// multiple build types for a single variable. See `[BuildType]` and `[rerun_for_envs]` below to
/// see how this list is used.
const REBUILD_VARS: [(&str, u8); 15] = [
const REBUILD_VARS: [(&str, u8); 14] = [
("BUILDSYS_ARCH", PACKAGE | KIT | VARIANT),
("BUILDSYS_CACERTS_BUNDLE_OVERRIDE", VARIANT),
("BUILDSYS_KITS_DIR", KIT),
Expand All @@ -27,7 +27,6 @@ const REBUILD_VARS: [(&str, u8); 15] = [
("BUILDSYS_PRETTY_NAME", VARIANT),
("BUILDSYS_ROOT_DIR", PACKAGE | KIT | VARIANT),
("BUILDSYS_STATE_DIR", PACKAGE | KIT | VARIANT),
("BUILDSYS_VARIANT", VARIANT),
("BUILDSYS_VERSION_BUILD", KIT | VARIANT),
("BUILDSYS_VERSION_IMAGE", KIT | VARIANT),
("TLPRIVATE_SDK_IMAGE", PACKAGE | KIT | VARIANT),
Expand Down Expand Up @@ -268,7 +267,7 @@ fn build_type_includes_test() {
fn test_sensitive_env_vars_variant() {
let list: Vec<&str> = sensitive_env_vars(BuildFlags::Variant).collect();
assert!(list.contains(&"BUILDSYS_ARCH"));
assert!(list.contains(&"BUILDSYS_VARIANT"));
assert!(list.contains(&"BUILDSYS_IMAGES_DIR"));
assert!(!list.contains(&"BUILDSYS_PACKAGES_DIR"));
}

Expand All @@ -277,5 +276,13 @@ fn test_sensitive_env_vars_package() {
let list: Vec<&str> = sensitive_env_vars(BuildFlags::Package).collect();
assert!(list.contains(&"BUILDSYS_ARCH"));
assert!(list.contains(&"BUILDSYS_PACKAGES_DIR"));
assert!(!list.contains(&"BUILDSYS_VARIANT"));
assert!(!list.contains(&"BUILDSYS_KITS_DIR"));
}

#[test]
fn test_sensitive_env_vars_kit() {
let list: Vec<&str> = sensitive_env_vars(BuildFlags::Kit).collect();
assert!(list.contains(&"BUILDSYS_ARCH"));
assert!(list.contains(&"BUILDSYS_KITS_DIR"));
assert!(!list.contains(&"BUILDSYS_IMAGES_DIR"));
}
Loading