Browse Source

Merge pull request #674 from ajwerner/use-nightly-to-build-ebpf

test/integration-test: use +nightly for ebpf
ajwerner 1 year ago
parent
commit
b28d4c34ee
2 changed files with 8 additions and 2 deletions
  1. 2 0
      test/integration-ebpf/rust-toolchain.toml
  2. 6 2
      test/integration-test/build.rs

+ 2 - 0
test/integration-ebpf/rust-toolchain.toml

@@ -0,0 +1,2 @@
+[toolchain]
+channel = "nightly"

+ 6 - 2
test/integration-test/build.rs

@@ -163,8 +163,6 @@ fn main() {
         let mut cmd = Command::new("cargo");
         cmd.args([
             "build",
-            "-p",
-            "integration-ebpf",
             "-Z",
             "build-std=core",
             "--release",
@@ -173,6 +171,12 @@ fn main() {
             &target,
         ]);
 
+        // Workaround to make sure that the rust-toolchain.toml is respected.
+        let Package { manifest_path, .. } = packages.get(INTEGRATION_EBPF_PACKAGE).unwrap();
+        let integration_ebpf_dir = manifest_path.parent().unwrap();
+        cmd.env_remove("RUSTUP_TOOLCHAIN")
+            .current_dir(integration_ebpf_dir);
+
         // Workaround for https://github.com/rust-lang/cargo/issues/6412 where cargo flocks itself.
         let ebpf_target_dir = out_dir.join("integration-ebpf");
         cmd.arg("--target-dir").arg(&ebpf_target_dir);