Merge "Remove test_per_src" into main am: 088123934b am: d66ec63bde

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3142038

Change-Id: I0aab777c604498195d67bf8e70f338f3b373210c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Colin Cross
2024-07-11 21:07:57 +00:00
committed by Automerger Merge Worker
9 changed files with 9 additions and 202 deletions

View File

@@ -5728,7 +5728,6 @@ func TestApexWithTests(t *testing.T) {
updatable: false,
tests: [
"mytest",
"mytests",
],
}
@@ -5771,25 +5770,6 @@ func TestApexWithTests(t *testing.T) {
"testdata/baz"
],
}
cc_test {
name: "mytests",
gtest: false,
srcs: [
"mytest1.cpp",
"mytest2.cpp",
"mytest3.cpp",
],
test_per_src: true,
relative_install_path: "test",
system_shared_libs: [],
static_executable: true,
stl: "none",
data: [
":fg",
":fg2",
],
}
`)
apexRule := ctx.ModuleForTests("myapex", "android_common_myapex").Rule("apexRule")
@@ -5803,11 +5783,6 @@ func TestApexWithTests(t *testing.T) {
ensureContains(t, copyCmds, "image.apex/bin/test/baz")
ensureContains(t, copyCmds, "image.apex/bin/test/bar/baz")
// Ensure that test deps built with `test_per_src` are copied into apex.
ensureContains(t, copyCmds, "image.apex/bin/test/mytest1")
ensureContains(t, copyCmds, "image.apex/bin/test/mytest2")
ensureContains(t, copyCmds, "image.apex/bin/test/mytest3")
// Ensure the module is correctly translated.
bundle := ctx.ModuleForTests("myapex", "android_common_myapex").Module().(*apexBundle)
data := android.AndroidMkDataForTest(t, ctx, bundle)
@@ -5817,9 +5792,6 @@ func TestApexWithTests(t *testing.T) {
data.Custom(&builder, name, prefix, "", data)
androidMk := builder.String()
ensureContains(t, androidMk, "LOCAL_MODULE := mytest.myapex\n")
ensureContains(t, androidMk, "LOCAL_MODULE := mytest1.myapex\n")
ensureContains(t, androidMk, "LOCAL_MODULE := mytest2.myapex\n")
ensureContains(t, androidMk, "LOCAL_MODULE := mytest3.myapex\n")
ensureContains(t, androidMk, "LOCAL_MODULE := myapex\n")
}