You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-libbpf-cargo/libbpf-cargo-fix-finding-li...

16 lines
527 B

Find libbpf-rs in /usr/share/cargo/registry, not in the local checkout
--- a/src/test.rs
+++ b/src/test.rs
@@ -103,10 +103,7 @@ fn validate_bpf_o(path: &Path) {
fn get_libbpf_rs_path() -> PathBuf {
let cwd = std::env::current_dir().expect("failed to get cwd");
- Path::new(&cwd)
- .parent()
- .expect("failed to get parent of cwd")
- .join("libbpf-rs")
+ Path::new("/usr/share/cargo/registry/libbpf-rs-0.19.1")
.canonicalize()
.expect("failed to canonicalize libbpf-rs")
}