bloaty: measure stripped Rust binaries
Modify bloaty's MeasureSizeForPath to allow a module to provide multiple paths. This is used to measure both unstripped and stripped libraries/binaries. Add unit test to ensure correct measurements are generated for Rust. Test: m out/soong/binary_sizes.pb.gz Change-Id: I59439b77dbf1cf5ad71e1c02996a6a90938536b4
This commit is contained in:
@@ -384,3 +384,17 @@ func TestMultilib(t *testing.T) {
|
||||
_ = ctx.ModuleForTests("libfoo", "android_arm64_armv8-a_rlib_dylib-std")
|
||||
_ = ctx.ModuleForTests("libfoo", "android_arm_armv7-a-neon_rlib_dylib-std")
|
||||
}
|
||||
|
||||
// Test that library size measurements are generated.
|
||||
func TestLibrarySizes(t *testing.T) {
|
||||
ctx := testRust(t, `
|
||||
rust_library_dylib {
|
||||
name: "libwaldo",
|
||||
srcs: ["foo.rs"],
|
||||
crate_name: "waldo",
|
||||
}`)
|
||||
|
||||
m := ctx.SingletonForTests("file_metrics")
|
||||
m.Output("libwaldo.dylib.so.bloaty.csv")
|
||||
m.Output("stripped/libwaldo.dylib.so.bloaty.csv")
|
||||
}
|
||||
|
Reference in New Issue
Block a user