Commit Graph

3 Commits (13d47b8aff3989e2077a45f1d2c8924a2cb141d9)

Author SHA1 Message Date
Tamir Duberstein 13d47b8aff
integration-ebpf: artifact dependency bpf-linker
Replace the manual dependency machinery in integration-test/build.rs
with:

- integration-ebpf -[artifact-dependency]-> bpf-linker.
- integration-test -[build-dependency]-> integration-ebpf.
- integration-ebpf: build.rs that makes bpf-linker available to rustc.
- integration-ebpf: lib.rs (empty) creates a lib target, allows dep from
  integration-test.
- xtask: filter for test binaries now that the build also produces the
  bpf-linker binary.
- github: remove `cargo install bpf-linker` and commentary about cache
  invalidation.
- integration-test: remove bpf-linker installation instructions.
2 years ago
Tamir Duberstein 6ca7d53733
Remove detritus
- rustfmt settings are hierarchical.
- integration-ebpf is always compiled at a distance with flags provided.
- .cargo/config.toml is not respected except at the root of the
  workspace[0].

[0] https://doc.rust-lang.org/cargo/reference/config.html#hierarchical-structure
2 years ago
Dave Tucker 79101e748a test: Replace RTF with Rust
This commit replaces the existing RTF test runner with a simple rust
binary package called - integration-test.

integration-test depends on integration-ebpf, which contains test eBPF
code written in Rust and C. `cargo xtask build-integration-test-ebpf`
can be used to build this code and supress rust-analyzer warnings. It
does require `bpf-linker`, but that is highly likely to be available to
developers of Aya. It also requires a checkout of `libbpf` to extract
headers like bpf-helpers.h.

Since everything is compiled into a single binary, it can be run
be run locally using `cargo xtask integration-test` or remotely using
`./run.sh` which re-uses the bash script from the old test framework
to spawn a VM in which to run the tests.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago