integration-test: rerun-if-changed=integration-ebpf

See code commentary for details.
pull/699/head
Tamir Duberstein 1 year ago
parent 13e83b24ee
commit 49cbb1366f
No known key found for this signature in database

@ -135,13 +135,21 @@ fn main() {
let Package { manifest_path, .. } = integration_ebpf_package; let Package { manifest_path, .. } = integration_ebpf_package;
let integration_ebpf_dir = manifest_path.parent().unwrap(); let integration_ebpf_dir = manifest_path.parent().unwrap();
// We have a build-dependency on `integration-ebpf`, so cargo will automatically rebuild us
// if `integration-ebpf`'s *library* target or any of its dependencies change. Since we
// depend on `integration-ebpf`'s *binary* targets, that only gets us half of the way. This
// stanza ensures cargo will rebuild us on changes to the binaries too, which gets us the
// rest of the way.
println!("cargo:rerun-if-changed={}", integration_ebpf_dir.as_str());
let mut cmd = Command::new("cargo"); let mut cmd = Command::new("cargo");
cmd.args([ cmd.args([
"build", "build",
"-Z", "-Z",
"build-std=core", "build-std=core",
"--release", "--bins",
"--message-format=json", "--message-format=json",
"--release",
"--target", "--target",
&target, &target,
]); ]);

Loading…
Cancel
Save