Merge "Export RunBp2BuildTestCaseSimple() in testing.go" am: d6fdd16617
am: 5bcde4ec94
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2203335 Change-Id: I4640769e5ef0b862d97c4fcaa6e3c2d6ea4b475c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
c9481feb47
8 changed files with 23 additions and 23 deletions
|
@ -751,7 +751,7 @@ func TestBp2buildHostAndDevice(t *testing.T) {
|
|||
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.Description, func(t *testing.T) {
|
||||
runBp2BuildTestCaseSimple(t, tc)
|
||||
RunBp2BuildTestCaseSimple(t, tc)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -1494,7 +1494,7 @@ func TestGlobExcludeSrcs(t *testing.T) {
|
|||
|
||||
for _, testCase := range testCases {
|
||||
t.Run(testCase.Description, func(t *testing.T) {
|
||||
runBp2BuildTestCaseSimple(t, testCase)
|
||||
RunBp2BuildTestCaseSimple(t, testCase)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -1593,7 +1593,7 @@ filegroup {
|
|||
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.Description, func(t *testing.T) {
|
||||
runBp2BuildTestCaseSimple(t, tc)
|
||||
RunBp2BuildTestCaseSimple(t, tc)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ import (
|
|||
)
|
||||
|
||||
func TestPrebuiltLibraryStaticAndSharedSimple(t *testing.T) {
|
||||
runBp2BuildTestCaseSimple(t,
|
||||
RunBp2BuildTestCaseSimple(t,
|
||||
Bp2buildTestCase{
|
||||
Description: "prebuilt library static and shared simple",
|
||||
ModuleTypeUnderTest: "cc_prebuilt_library",
|
||||
|
@ -47,7 +47,7 @@ cc_prebuilt_library {
|
|||
}
|
||||
|
||||
func TestPrebuiltLibraryWithArchVariance(t *testing.T) {
|
||||
runBp2BuildTestCaseSimple(t,
|
||||
RunBp2BuildTestCaseSimple(t,
|
||||
Bp2buildTestCase{
|
||||
Description: "prebuilt library with arch variance",
|
||||
ModuleTypeUnderTest: "cc_prebuilt_library",
|
||||
|
@ -85,7 +85,7 @@ cc_prebuilt_library {
|
|||
}
|
||||
|
||||
func TestPrebuiltLibraryAdditionalAttrs(t *testing.T) {
|
||||
runBp2BuildTestCaseSimple(t,
|
||||
RunBp2BuildTestCaseSimple(t,
|
||||
Bp2buildTestCase{
|
||||
Description: "prebuilt library additional attributes",
|
||||
ModuleTypeUnderTest: "cc_prebuilt_library",
|
||||
|
@ -118,7 +118,7 @@ cc_prebuilt_library {
|
|||
}
|
||||
|
||||
func TestPrebuiltLibrarySharedStanzaFails(t *testing.T) {
|
||||
runBp2BuildTestCaseSimple(t,
|
||||
RunBp2BuildTestCaseSimple(t,
|
||||
Bp2buildTestCase{
|
||||
Description: "prebuilt library with shared stanza fails because multiple sources",
|
||||
ModuleTypeUnderTest: "cc_prebuilt_library",
|
||||
|
@ -141,7 +141,7 @@ cc_prebuilt_library {
|
|||
}
|
||||
|
||||
func TestPrebuiltLibraryStaticStanzaFails(t *testing.T) {
|
||||
runBp2BuildTestCaseSimple(t,
|
||||
RunBp2BuildTestCaseSimple(t,
|
||||
Bp2buildTestCase{
|
||||
Description: "prebuilt library with static stanza fails because multiple sources",
|
||||
ModuleTypeUnderTest: "cc_prebuilt_library",
|
||||
|
@ -164,7 +164,7 @@ cc_prebuilt_library {
|
|||
}
|
||||
|
||||
func TestPrebuiltLibrarySharedAndStaticStanzas(t *testing.T) {
|
||||
runBp2BuildTestCaseSimple(t,
|
||||
RunBp2BuildTestCaseSimple(t,
|
||||
Bp2buildTestCase{
|
||||
Description: "prebuilt library with both shared and static stanzas",
|
||||
ModuleTypeUnderTest: "cc_prebuilt_library",
|
||||
|
@ -197,7 +197,7 @@ cc_prebuilt_library {
|
|||
|
||||
// TODO(b/228623543): When this bug is fixed, enable this test
|
||||
//func TestPrebuiltLibraryOnlyShared(t *testing.T) {
|
||||
// runBp2BuildTestCaseSimple(t,
|
||||
// RunBp2BuildTestCaseSimple(t,
|
||||
// bp2buildTestCase{
|
||||
// description: "prebuilt library shared only",
|
||||
// moduleTypeUnderTest: "cc_prebuilt_library",
|
||||
|
@ -224,7 +224,7 @@ cc_prebuilt_library {
|
|||
|
||||
// TODO(b/228623543): When this bug is fixed, enable this test
|
||||
//func TestPrebuiltLibraryOnlyStatic(t *testing.T) {
|
||||
// runBp2BuildTestCaseSimple(t,
|
||||
// RunBp2BuildTestCaseSimple(t,
|
||||
// bp2buildTestCase{
|
||||
// description: "prebuilt library static only",
|
||||
// moduleTypeUnderTest: "cc_prebuilt_library",
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
)
|
||||
|
||||
func TestSharedPrebuiltLibrary(t *testing.T) {
|
||||
runBp2BuildTestCaseSimple(t,
|
||||
RunBp2BuildTestCaseSimple(t,
|
||||
Bp2buildTestCase{
|
||||
Description: "prebuilt library shared simple",
|
||||
ModuleTypeUnderTest: "cc_prebuilt_library_shared",
|
||||
|
@ -31,7 +31,7 @@ cc_prebuilt_library_shared {
|
|||
}
|
||||
|
||||
func TestSharedPrebuiltLibraryWithArchVariance(t *testing.T) {
|
||||
runBp2BuildTestCaseSimple(t,
|
||||
RunBp2BuildTestCaseSimple(t,
|
||||
Bp2buildTestCase{
|
||||
Description: "prebuilt library shared with arch variance",
|
||||
ModuleTypeUnderTest: "cc_prebuilt_library_shared",
|
||||
|
@ -62,7 +62,7 @@ cc_prebuilt_library_shared {
|
|||
}
|
||||
|
||||
func TestSharedPrebuiltLibrarySharedStanzaFails(t *testing.T) {
|
||||
runBp2BuildTestCaseSimple(t,
|
||||
RunBp2BuildTestCaseSimple(t,
|
||||
Bp2buildTestCase{
|
||||
Description: "prebuilt library shared with shared stanza fails because multiple sources",
|
||||
ModuleTypeUnderTest: "cc_prebuilt_library_shared",
|
||||
|
|
|
@ -21,7 +21,7 @@ import (
|
|||
)
|
||||
|
||||
func TestStaticPrebuiltLibrary(t *testing.T) {
|
||||
runBp2BuildTestCaseSimple(t,
|
||||
RunBp2BuildTestCaseSimple(t,
|
||||
Bp2buildTestCase{
|
||||
Description: "prebuilt library static simple",
|
||||
ModuleTypeUnderTest: "cc_prebuilt_library_static",
|
||||
|
@ -44,7 +44,7 @@ cc_prebuilt_library_static {
|
|||
}
|
||||
|
||||
func TestStaticPrebuiltLibraryWithArchVariance(t *testing.T) {
|
||||
runBp2BuildTestCaseSimple(t,
|
||||
RunBp2BuildTestCaseSimple(t,
|
||||
Bp2buildTestCase{
|
||||
Description: "prebuilt library static with arch variance",
|
||||
ModuleTypeUnderTest: "cc_prebuilt_library_static",
|
||||
|
@ -75,7 +75,7 @@ cc_prebuilt_library_static {
|
|||
}
|
||||
|
||||
func TestStaticPrebuiltLibraryStaticStanzaFails(t *testing.T) {
|
||||
runBp2BuildTestCaseSimple(t,
|
||||
RunBp2BuildTestCaseSimple(t,
|
||||
Bp2buildTestCase{
|
||||
Description: "prebuilt library with static stanza fails because multiple sources",
|
||||
ModuleTypeUnderTest: "cc_prebuilt_library_static",
|
||||
|
|
|
@ -25,7 +25,7 @@ func runLinkerConfigTestCase(t *testing.T, tc Bp2buildTestCase) {
|
|||
t.Helper()
|
||||
(&tc).ModuleTypeUnderTest = "linker_config"
|
||||
(&tc).ModuleTypeUnderTestFactory = linkerconfig.LinkerConfigFactory
|
||||
runBp2BuildTestCaseSimple(t, tc)
|
||||
RunBp2BuildTestCaseSimple(t, tc)
|
||||
}
|
||||
|
||||
func TestLinkerConfigConvertsSrc(t *testing.T) {
|
||||
|
|
|
@ -62,7 +62,7 @@ func TestPythonBinaryHostSimple(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestPythonBinaryHostPy2(t *testing.T) {
|
||||
runBp2BuildTestCaseSimple(t, Bp2buildTestCase{
|
||||
RunBp2BuildTestCaseSimple(t, Bp2buildTestCase{
|
||||
Description: "py2 python_binary_host",
|
||||
ModuleTypeUnderTest: "python_binary_host",
|
||||
ModuleTypeUnderTestFactory: python.PythonBinaryHostFactory,
|
||||
|
@ -96,7 +96,7 @@ func TestPythonBinaryHostPy2(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestPythonBinaryHostPy3(t *testing.T) {
|
||||
runBp2BuildTestCaseSimple(t, Bp2buildTestCase{
|
||||
RunBp2BuildTestCaseSimple(t, Bp2buildTestCase{
|
||||
Description: "py3 python_binary_host",
|
||||
ModuleTypeUnderTest: "python_binary_host",
|
||||
ModuleTypeUnderTestFactory: python.PythonBinaryHostFactory,
|
||||
|
@ -130,7 +130,7 @@ func TestPythonBinaryHostPy3(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestPythonBinaryHostArchVariance(t *testing.T) {
|
||||
runBp2BuildTestCaseSimple(t, Bp2buildTestCase{
|
||||
RunBp2BuildTestCaseSimple(t, Bp2buildTestCase{
|
||||
Description: "test arch variants",
|
||||
ModuleTypeUnderTest: "python_binary_host",
|
||||
ModuleTypeUnderTestFactory: python.PythonBinaryHostFactory,
|
||||
|
|
|
@ -66,7 +66,7 @@ func runPythonLibraryTestCase(t *testing.T, tc pythonLibBp2BuildTestCase) {
|
|||
testCase.ModuleTypeUnderTest = "python_library"
|
||||
testCase.ModuleTypeUnderTestFactory = python.PythonLibraryFactory
|
||||
|
||||
runBp2BuildTestCaseSimple(t, testCase)
|
||||
RunBp2BuildTestCaseSimple(t, testCase)
|
||||
}
|
||||
|
||||
func runPythonLibraryHostTestCase(t *testing.T, tc pythonLibBp2BuildTestCase) {
|
||||
|
|
|
@ -71,7 +71,7 @@ func errored(t *testing.T, tc Bp2buildTestCase, errs []error) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func runBp2BuildTestCaseSimple(t *testing.T, tc Bp2buildTestCase) {
|
||||
func RunBp2BuildTestCaseSimple(t *testing.T, tc Bp2buildTestCase) {
|
||||
t.Helper()
|
||||
RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {}, tc)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue