Răsfoiți Sursa

integration-test: bust cache on bpf-linker

This is useful when iterating on bpf-linker locally, which is otherwise
an undeclared input to this build.

We could use an artifact dependency[0] here, but they are unstable and
bpf-linker requires gymnastics to build correctly (for now).

[0] https://doc.rust-lang.org/cargo/reference/unstable.html#artifact-dependencies-dependency-declarations
Tamir Duberstein 1 an în urmă
părinte
comite
581d5c8f5f
2 a modificat fișierele cu 6 adăugiri și 1 ștergeri
  1. 2 1
      test/integration-test/Cargo.toml
  2. 4 0
      test/integration-test/build.rs

+ 2 - 1
test/integration-test/Cargo.toml

@@ -24,4 +24,5 @@ tokio = { version = "1.24", default-features = false, features = [
 ] }
 
 [build-dependencies]
-cargo_metadata = "0.15.4"
+cargo_metadata = { version = "0.15.4", default-features = false }
+which = { version = "4.4.0", default-features = false }

+ 4 - 0
test/integration-test/build.rs

@@ -12,6 +12,7 @@ use std::{
 use cargo_metadata::{
     Artifact, CompilerMessage, Dependency, Message, Metadata, MetadataCommand, Package, Target,
 };
+use which::which;
 
 fn main() {
     const AYA_BUILD_INTEGRATION_BPF: &str = "AYA_BUILD_INTEGRATION_BPF";
@@ -147,6 +148,9 @@ fn main() {
             }
         }
 
+        let bpf_linker = which("bpf-linker").unwrap();
+        println!("cargo:rerun-if-changed={}", bpf_linker.to_str().unwrap());
+
         let mut cmd = Command::new("cargo");
         cmd.args([
             "build",