bootstrap: disarm tests that requires git context
authorFabian Grünbichler <git@fabian.gruenbichler.email>
Wed, 3 Sep 2025 12:45:32 +0000 (14:45 +0200)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Fri, 26 Dec 2025 19:54:51 +0000 (20:54 +0100)
Signed-off-by: Fabian Grünbichler <git@fabian.gruenbichler.email>
Gbp-Pq: Topic build
Gbp-Pq: Name bootstrap-disarm-llvm-config-test-that-requires-git.patch

src/bootstrap/src/core/builder/tests.rs
src/bootstrap/src/core/config/tests.rs
src/bootstrap/src/utils/helpers/tests.rs

index 89a0ab7711ee2911fac952ac47d5bd973061b11f..2d568f839cbc8c33399ff1f876831879e48e1e53 100644 (file)
@@ -443,6 +443,9 @@ fn test_prebuilt_llvm_config_path_resolution() {
         .join(exe("llvm-config", builder.config.host_target));
     assert_eq!(expected, actual);
 
+    // Debian: if-unchanged fails for non-git sources
+    return;
+
     let config = configure(
         r#"
             [llvm]
index 802a232e14f0a71ad435c6c411b8cc08f0606a38..23c2937f87bc39c13b513a3174990578c3be6d3a 100644 (file)
@@ -53,6 +53,8 @@ fn download_ci_llvm() {
     let config = parse("llvm.download-ci-llvm = false");
     assert!(!config.llvm_from_ci);
 
+    // Debian: if-unchanged doesn't work in non-git context
+    return;
     let if_unchanged_config = parse("llvm.download-ci-llvm = \"if-unchanged\"");
     if if_unchanged_config.llvm_from_ci && if_unchanged_config.is_running_on_ci {
         let has_changes = if_unchanged_config.has_changes_from_upstream(LLVM_INVALIDATION_PATHS);
@@ -474,6 +476,7 @@ fn check_rustc_if_unchanged_paths() {
         .collect();
 
     for p in normalised_allowed_paths {
+        if p == "triagebot.toml" { continue };
         assert!(config.src.join(p).exists(), "{p} doesn't exist.");
     }
 }
@@ -556,6 +559,9 @@ fn test_exclude() {
 
 #[test]
 fn test_ci_flag() {
+    // Debian: if-unchanged doesn't work in non-git context
+    return;
+
     let config = Config::parse_inner(Flags::parse(&["check".into(), "--ci=false".into()]), |&_| {
         toml::from_str("")
     });
index 9030ca2820a8b1373bffbb3a5cf92e2c12a54d62..4a29a949c478dc6ab3aff85eca1b9d714abb07ca 100644 (file)
@@ -102,6 +102,9 @@ fn test_set_file_times_sanity_check() {
 
 #[test]
 fn test_submodule_path_of() {
+    // Debian: doesn't work in non-git context
+    return;
+
     let config = Config::parse_inner(Flags::parse(&["build".into(), "--dry-run".into()]), |&_| {
         Ok(Default::default())
     });