mirror of https://github.com/aya-rs/aya
integration-test: build one binary instead of N
"integration tests" as defined by Cargo produce a binary per file in the tests directory. This is really not what we want and has a number of downsides, but the main one is binary size. Before: tamird@pc:~/src/aya$ cargo xtask build-integration-test | xargs ls -lah Finished dev [unoptimized + debuginfo] target(s) in 0.05s Running `target/debug/xtask build-integration-test` Compiling integration-test v0.1.0 (/home/tamird/src/aya/test/integration-test) Finished dev [unoptimized + debuginfo] target(s) in 0.68s -rwxrwxr-x 1 tamird tamird 34M Jul 12 15:21 /home/tamird/src/aya/target/debug/deps/bpf_probe_read-e03eb905a5e6209c -rwxrwxr-x 1 tamird tamird 35M Jul 12 15:21 /home/tamird/src/aya/target/debug/deps/btf_relocations-57a4fbb38bf06064 -rwxrwxr-x 1 tamird tamird 31M Jul 12 15:21 /home/tamird/src/aya/target/debug/deps/elf-98b7a32d6d04effb -rwxrwxr-x 1 tamird tamird 6.9M Jul 12 15:21 /home/tamird/src/aya/target/debug/deps/integration_test-0dd55ce96bfdad77 -rwxrwxr-x 1 tamird tamird 34M Jul 12 15:21 /home/tamird/src/aya/target/debug/deps/load-0718562e85b86d03 -rwxrwxr-x 1 tamird tamird 40M Jul 12 15:21 /home/tamird/src/aya/target/debug/deps/log-dbf355f9ea34068a -rwxrwxr-x 1 tamird tamird 36M Jul 12 15:21 /home/tamird/src/aya/target/debug/deps/rbpf-89a1bb848fa5cc3c -rwxrwxr-x 1 tamird tamird 34M Jul 12 15:21 /home/tamird/src/aya/target/debug/deps/relocations-cfe655c3bb413d8b -rwxrwxr-x 1 tamird tamird 34M Jul 12 15:21 /home/tamird/src/aya/target/debug/deps/smoke-ccd3974180a3fd29 After: tamird@pc:~/src/aya$ cargo xtask build-integration-test | xargs ls -lah Finished dev [unoptimized + debuginfo] target(s) in 0.05s Running `target/debug/xtask build-integration-test` Compiling integration-test v0.1.0 (/home/tamird/src/aya/test/integration-test) Finished dev [unoptimized + debuginfo] target(s) in 0.90s -rwxrwxr-x 1 tamird tamird 47M Jul 12 15:21 /home/tamird/src/aya/target/debug/deps/integration_test-0dd55ce96bfdad77 Since we plan to run these tests in a VM, copying 10x fewer bytes seems like a win.pull/644/head
parent
728a25d9d9
commit
23bea22ac1
@ -0,0 +1,8 @@
|
||||
mod bpf_probe_read;
|
||||
mod btf_relocations;
|
||||
mod elf;
|
||||
mod load;
|
||||
mod log;
|
||||
mod rbpf;
|
||||
mod relocations;
|
||||
mod smoke;
|
Loading…
Reference in New Issue