summaryrefslogtreecommitdiff
path: root/cc/cc_test.go
diff options
context:
space:
mode:
author Wei Li <weiwli@google.com> 2023-12-12 18:08:40 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2023-12-12 18:08:40 +0000
commitb22fb3598107e8ec8851f901b03404f24e812d3a (patch)
treec7d895a398a18bf76f31214cc3c3e4c352d1b787 /cc/cc_test.go
parent284ec6a2d7631db621179837301410258103e294 (diff)
parent26d380bf2292eb2d4c3b3ed492291373bbecc14c (diff)
Merge "Build native libraries used by layoutlib." into main am: c1fb159206 am: 1529f7f8de am: 26d380bf22
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2868429 Change-Id: I39c8c98c0ac4612ce1acdc9629ae7e5866d8e80c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'cc/cc_test.go')
-rw-r--r--cc/cc_test.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/cc/cc_test.go b/cc/cc_test.go
index a1842d7f7..3631f1998 100644
--- a/cc/cc_test.go
+++ b/cc/cc_test.go
@@ -4758,3 +4758,29 @@ func TestCcBuildBrokenClangCFlags(t *testing.T) {
})
}
}
+
+func TestStrippedAllOutputFile(t *testing.T) {
+ t.Parallel()
+ bp := `
+ cc_library {
+ name: "test_lib",
+ srcs: ["test_lib.cpp"],
+ dist: {
+ targets: [ "dist_target" ],
+ tag: "stripped_all",
+ }
+ }
+ `
+ config := TestConfig(t.TempDir(), android.Android, nil, bp, nil)
+ ctx := testCcWithConfig(t, config)
+ module := ctx.ModuleForTests("test_lib", "android_arm_armv7-a-neon_shared").Module()
+ outputFile, err := module.(android.OutputFileProducer).OutputFiles("stripped_all")
+ if err != nil {
+ t.Errorf("Expected cc_library to produce output files, error: %s", err)
+ return
+ }
+ if !strings.HasSuffix(outputFile.Strings()[0], "/stripped_all/test_lib.so") {
+ t.Errorf("Unexpected output file: %s", outputFile.Strings()[0])
+ return
+ }
+}