diff --git a/test/integration-ebpf/rust-toolchain.toml b/test/integration-ebpf/rust-toolchain.toml new file mode 100644 index 00000000..5d56faf9 --- /dev/null +++ b/test/integration-ebpf/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "nightly" diff --git a/test/integration-test/build.rs b/test/integration-test/build.rs index a0776948..f41c4354 100644 --- a/test/integration-test/build.rs +++ b/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);