Skip to content

Commit

Permalink
buildsys: do not track BUILDSYS_VARIANT
Browse files Browse the repository at this point in the history
The `BUILDSYS_VARIANT` environment variable no longer affects builds,
and doesn't need to be tracked for changes.

Signed-off-by: Ben Cressey <[email protected]>
  • Loading branch information
bcressey committed Sep 20, 2024
1 parent 15251cb commit edf6e26
Showing 1 changed file with 11 additions and 4 deletions.
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"));
}

0 comments on commit edf6e26

Please sign in to comment.