platform_build_soong/android
Paul Duffin 4c0765a669 Support running bp2build tests in fixtures
Previously, the fixture test infrastructure was hard coded to
initialize itself in preparation for invoking the PrepareBuildActions()
method. That meant it could not be used for testing the bp2build and
apiBp2build modes which required different initialization and called a
different method.

This change extracts that behavior into a FixtureTestRunner and adds an
implementation that allows it to test the above two modes. It then uses
that to implement the runBp2BuildTestCaseWithSetup method.

The TestPrebuiltLibraryAdditionalAttrs was the only test which broke as
it supplied an invalid path to the MockFS (it does not support using a
trailing / to represent an empty build directory). So, it was modified
to add a couple of files inside those directories instead.

Test: m nothing
Change-Id: I6798a4f761160af8d1bfed81d46de9628bda3eb9
2022-12-02 11:14:17 +00:00
..
allowlists Merge "Use existing BUILD files for test-related tools." 2022-12-01 07:32:59 +00:00
soongconfig Merge "Revert^4 "Prevent unspecified values in soong_config_string_variables"" 2022-11-02 16:56:45 +00:00
Android.bp Create api_domain module type and its bp2build converter 2022-09-21 19:49:46 +00:00
android_test.go Make OutputFileForModule work for AllowMissingDependencies 2022-10-04 16:38:14 -07:00
androidmk.go Show module type in a module section of the Android-TARGET.mk 2022-12-01 21:12:11 -08:00
androidmk_test.go Make sure dist files have license metadata. 2022-06-01 21:07:25 -07:00
apex.go Remove obsolete com.android.bluetooth apex 2022-09-14 21:09:50 +00:00
apex_test.go Remove unused uses_sdks property for apexes 2022-05-20 07:45:48 +00:00
api_domain.go Skip the noop Soong dep edge for api_domain and contributions 2022-10-25 19:22:07 +00:00
api_levels.go Merge "Revert^2 "Fix erroneous "Field requires API level 33 (current min is 32)" warnings"" am: 100c7ad7f2 2022-07-01 23:06:03 +00:00
arch.go Export ndk/aml arches to Bazel 2022-11-11 15:27:56 -05:00
arch_list.go Export variant/features via soong_injection 2022-02-28 14:17:15 -05:00
arch_test.go Add riscv64-linux-android support 2022-10-03 08:43:13 -07:00
bazel.go Disable bazel for riscv_64 2022-11-29 15:35:56 -05:00
bazel_handler.go Print error code when bazel invocation fails 2022-12-01 13:37:48 -08:00
bazel_handler_test.go Provide Bazel timing breakdown for the mixed builds 2022-11-16 18:44:08 -08:00
bazel_paths.go Introduce BazelStringOrLabelFromProp. 2022-10-20 14:57:37 +00:00
bazel_paths_test.go File paths to allow "./" prefix 2022-09-26 14:44:15 -04:00
bazel_test.go add test for ShouldKeepExistingBuldFileForDir() 2022-11-02 17:21:41 -04:00
buildinfo_prop.go buildinfo_prop generates ro.build.version.known_codenames 2022-06-21 10:13:42 +09:00
config.go fallback to nonmixed builds for unsupported builds 2022-11-30 10:36:48 -05:00
config_bp2build.go export clang-tidy variables to soong_injection 2022-10-25 15:55:17 -04:00
config_bp2build_test.go export Java variables to Bazel 2022-04-08 14:15:43 +00:00
config_test.go
configured_jars.go Split up config.go 2022-08-01 16:07:30 -04:00
csuite_config.go
csuite_config_test.go
deapexer.go Treat <x> and <x>_compressed prebuilt APEXes as being equivalent 2022-06-13 13:16:53 +00:00
defaults.go Refactor mixed build allowlist handling 2022-08-23 13:15:12 -04:00
defaults_test.go Add protected_properties support in defaults modules 2022-05-04 21:41:55 +00:00
defs.go export neverallow include dir list to Bazel 2022-11-15 17:33:21 -05:00
depset_generic.go
depset_paths.go
depset_test.go
deptag.go
deptag_test.go
expand.go
expand_test.go
filegroup.go use CommonAttributes for Tags in protos filegroups 2022-11-21 16:25:20 -05:00
filegroup_test.go Disable all filegroups in mixed builds 2022-10-24 11:11:58 -04:00
fixture.go Support running bp2build tests in fixtures 2022-12-02 11:14:17 +00:00
fixture_test.go
gen_notice.go Only generated notices for built variants. 2022-11-14 14:17:55 -08:00
gen_notice_test.go Integrate gen_notice with Make for dist. 2022-09-14 14:21:44 -07:00
hooks.go Share CreateModule between hooks & mutators 2022-04-26 09:08:55 -04:00
image.go
license.go Prevent duplicated license_kinds 2022-11-22 17:43:40 -08:00
license_kind.go Implement bp2build for the license_kind module 2022-09-14 13:49:27 -07:00
license_kind_test.go
license_metadata.go Added module_name to license metadata 2022-10-13 13:52:56 -07:00
license_sdk_member.go Support multiple library names per target. 2022-02-11 10:36:22 -08:00
license_test.go Prevent duplicated license_kinds 2022-11-22 17:43:40 -08:00
licenses.go Export SBOM utility to make 2022-11-02 19:17:30 +00:00
licenses_test.go Support multiple library names per target. 2022-02-11 10:36:22 -08:00
makefile_goal.go
makevars.go Tweak Soong install rules logging 2022-10-25 11:46:01 +02:00
metrics.go Avoid loss of ninja_deps events 2022-11-07 14:12:11 +00:00
module.go Add more cases to vendor-installed module 2022-11-29 10:58:08 +09:00
module_test.go Make OutputFileForModule work for AllowMissingDependencies 2022-10-04 16:38:14 -07:00
mutator.go Convert apex_available (for supported modules) to bazel tags. 2022-12-01 06:25:25 +00:00
mutator_test.go
namespace.go Allow namespace config to be tested properly 2022-11-08 17:38:56 +00:00
namespace_test.go Allow namespace config to be tested properly 2022-11-08 17:38:56 +00:00
neverallow.go Allow stubs implementation to be omitted 2022-11-22 16:00:02 +00:00
neverallow_test.go Allow stubs implementation to be omitted 2022-11-22 16:00:02 +00:00
ninja_deps.go
ninja_deps_test.go Make PackageVarContext implement PathGlobContext 2022-11-04 09:04:02 -07:00
notices.go Fix strip_prefix flags to strip install paths. 2022-06-09 15:00:08 -07:00
onceper.go Add top level and per-mutator traces to soong_build 2022-07-22 10:01:35 -07:00
onceper_test.go
override_module.go
package.go Implement bp2build for the package module 2022-09-14 13:49:27 -07:00
package_ctx.go Make PackageVarContext implement PathGlobContext 2022-11-04 09:04:02 -07:00
package_test.go cosmetic changes 2021-12-13 13:33:15 -05:00
packaging.go Move GatherPackagingSpecs out of CopyDepsToZip 2022-03-28 14:29:14 +09:00
packaging_test.go Move GatherPackagingSpecs out of CopyDepsToZip 2022-03-28 14:29:14 +09:00
path_properties.go Use Module.GetProperties() instead of ModuleBase.generalProperties 2022-01-08 03:09:52 +00:00
path_properties_test.go
paths.go Make PackageVarContext implement PathGlobContext 2022-11-04 09:04:02 -07:00
paths_test.go Remove InstallBypassMake and ToMakePath 2021-12-15 15:22:53 -08:00
phony.go
prebuilt.go java_sdk_library_import: Copy all prebuilt properties to child modules 2022-09-28 13:58:52 +01:00
prebuilt_build_tool.go
prebuilt_test.go
proto.go use CommonAttributes for Tags in protos filegroups 2022-11-21 16:25:20 -05:00
register.go Create a new mode in soong_ui to generate API only BUILD files 2022-10-04 17:32:56 +00:00
rule_builder.go Reformat build/soong for go 1.19 2022-08-17 10:43:13 -07:00
rule_builder_test.go Enable restat for sbox rules 2022-04-04 16:42:46 -07:00
sandbox.go
sdk.go Revert "Improve error reporting when depending on prebuilt implementation jar" 2022-11-21 10:57:30 +00:00
sdk_test.go
sdk_version.go Propagate max_sdk_version to manifest_fixer 2022-06-28 22:07:23 +00:00
sdk_version_test.go
singleton.go Fix bug: allow multiple gen_notice modules. 2022-05-20 16:54:00 -07:00
singleton_module.go
singleton_module_test.go Move functionality to test install rules into testing.go. 2022-02-10 23:36:06 +00:00
soong_config_modules.go Merge "Make all Nameless modules have unique names" 2022-09-16 21:23:36 +00:00
soong_config_modules_test.go Add package for printing starlark formatted data 2022-02-08 17:32:28 -05:00
test_asserts.go
test_config.go Disable bazel for riscv_64 2022-11-29 15:35:56 -05:00
test_suites.go Remove InstallBypassMake and ToMakePath 2021-12-15 15:22:53 -08:00
testing.go Extend sanitize_test.go 2022-11-22 11:46:34 -05:00
updatable_modules.go Moving default version outside of apex package 2022-08-01 16:28:48 +01:00
util.go Support cc code coverage for mixed build 2022-06-06 12:29:25 -07:00
util_test.go Add SortedStringValues and SortedUniqueStringValues 2022-02-17 15:52:07 -08:00
variable.go Remove AfdoAdditionalProfileDirs product variable 2022-11-11 03:29:31 +00:00
variable_test.go
visibility.go Add gen_notice module. 2022-05-18 16:38:19 -07:00
visibility_test.go gen_module visibility tests. 2022-05-20 16:54:13 -07:00