Jelajahi Sumber

integration-test: build eBPF for the proper arch

Prior to this change we neglected to build integration-ebpf for the
correct target architecture, resulting in test failures on arm64.
Tamir Duberstein 1 tahun lalu
induk
melakukan
15de14383d
1 mengubah file dengan 3 tambahan dan 1 penghapusan
  1. 3 1
      test/integration-test/build.rs

+ 3 - 1
test/integration-test/build.rs

@@ -107,7 +107,7 @@ fn main() {
         } else if arch == "aarch64" {
             target_arch.push("arm64");
         } else {
-            target_arch.push(arch);
+            target_arch.push(&arch);
         };
 
         // NB: libbpf's documentation suggests that vmlinux.h be generated by running `bpftool btf
@@ -198,6 +198,8 @@ fn main() {
             &target,
         ]);
 
+        cmd.env("CARGO_CFG_BPF_TARGET_ARCH", arch);
+
         // Workaround to make sure that the rust-toolchain.toml is respected.
         for key in ["RUSTUP_TOOLCHAIN", "RUSTC"] {
             cmd.env_remove(key);