diff options
author | 2023-09-27 23:11:26 +0000 | |
---|---|---|
committer | 2023-09-27 23:11:26 +0000 | |
commit | 8a532b78e547bfbfa49d11a01b21e4a45b51da2c (patch) | |
tree | d84e90d4d16a6c64c6aa846b41825c6c43c80c38 | |
parent | 641b62b205bbfd769b05e8c65cba33551cbf02f7 (diff) |
Update bp2build tests to use stubbed defs
bp2build tests should not use bp2build_available:false test deps,
because, with the "allowlist v2" feature, this will cause these modules
to stop being converted with bp2build. Instead, such test deps should be
"stubbed", which effectively treats them like targets in pre-existing
BUILD files on the filesystem.
Bug: 301312260
Test: m nothing
Change-Id: Ib1ce7c87cd1e98568fdaf2a52a893dafa74ab327
-rw-r--r-- | bp2build/aconfig_conversion_test.go | 6 | ||||
-rw-r--r-- | bp2build/cc_library_conversion_test.go | 2 | ||||
-rw-r--r-- | bp2build/java_test_host_conversion_test.go | 3 |
3 files changed, 5 insertions, 6 deletions
diff --git a/bp2build/aconfig_conversion_test.go b/bp2build/aconfig_conversion_test.go index cbf42ac06..51f0b2ff3 100644 --- a/bp2build/aconfig_conversion_test.go +++ b/bp2build/aconfig_conversion_test.go @@ -105,7 +105,6 @@ func TestCcAconfigLibrary(t *testing.T) { cc_library { name: "server_configurable_flags", srcs: ["bar.cc"], - bazel_module: { bp2build_available: false }, } cc_aconfig_library { name: "foo", @@ -131,7 +130,8 @@ func TestCcAconfigLibrary(t *testing.T) { }, )} RunBp2BuildTestCase(t, registerAconfigModuleTypes, Bp2buildTestCase{ - Blueprint: bp, - ExpectedBazelTargets: expectedBazelTargets, + Blueprint: bp, + ExpectedBazelTargets: expectedBazelTargets, + StubbedBuildDefinitions: []string{"server_configurable_flags"}, }) } diff --git a/bp2build/cc_library_conversion_test.go b/bp2build/cc_library_conversion_test.go index c2b65a1a1..3cce430aa 100644 --- a/bp2build/cc_library_conversion_test.go +++ b/bp2build/cc_library_conversion_test.go @@ -5161,7 +5161,6 @@ func TestNdkLibraryConversion(t *testing.T) { Blueprint: ` cc_library { name: "libfoo", - bazel_module: { bp2build_available: false }, } ndk_library { name: "libfoo", @@ -5169,6 +5168,7 @@ ndk_library { symbol_file: "libfoo.map.txt", } `, + StubbedBuildDefinitions: []string{"libfoo"}, ExpectedBazelTargets: []string{ MakeBazelTarget("cc_stub_suite", "libfoo.ndk_stub_libs", AttrNameToString{ "api_surface": `"publicapi"`, diff --git a/bp2build/java_test_host_conversion_test.go b/bp2build/java_test_host_conversion_test.go index 95c239dbf..87f35f6bc 100644 --- a/bp2build/java_test_host_conversion_test.go +++ b/bp2build/java_test_host_conversion_test.go @@ -97,14 +97,13 @@ java_test_host { java_library { name: "lib_a", - bazel_module: { bp2build_available: false }, } java_library { name: "static_libs_a", - bazel_module: { bp2build_available: false }, } `, + StubbedBuildDefinitions: []string{"lib_a", "static_libs_a"}, ExpectedBazelTargets: []string{ MakeBazelTarget("java_test", "java_test_host-1", AttrNameToString{ "runtime_deps": `[ |