summaryrefslogtreecommitdiff
path: root/rust/rust_test.go
diff options
context:
space:
mode:
authorThiƩbaud Weksteen <tweek@google.com>2021-04-15 18:46:32 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-04-15 18:46:32 +0000
commit45c647d4dc47ac091f73826c0282b97be202ed84 (patch)
tree11648a3d3c1cefb68c470c8c81b0ec974864b81f /rust/rust_test.go
parent9e7cea2c0bbe6694ad32fd8e5784c7009f2080a5 (diff)
parente4dd14b25fe65b2fc6a5a2fb51d3647f1d455890 (diff)
Merge changes I59439b77,I7dbaf8be
* changes: bloaty: measure stripped Rust binaries rust: do not strip static library
Diffstat (limited to 'rust/rust_test.go')
-rw-r--r--rust/rust_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/rust/rust_test.go b/rust/rust_test.go
index 47c64a9ad..6ae05d988 100644
--- a/rust/rust_test.go
+++ b/rust/rust_test.go
@@ -402,3 +402,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")
+}