Also fix a bug that filename string may contain wild card
Test: Added unittest and CI
Bug: 303725325
Bug: 304590341
Change-Id: I5de9c195343328981a4154024c0fe4e14969ce79
This enables sharing of platform constraints between platform and kernel builds.
Bug: 304594734
Test: treehugger
Change-Id: I48091eeaf2e529c3f180ba056da3935911868b14
src == name causes circular dependency errors, instead mark these as
unconverted and don't create modules for them.
Test: m bp2build and verify boringssl_self_test.zygote64.rc unconverted
Change-Id: I5d5fdd7e14830cd685816064cd0377998d07293c
...instead of based on constraint settings.
Bug: 269577299
Test: m nothing and ./build/bazel/ci/bp2build.sh
Change-Id: Ib9caec79c92b8fd304e46be841de5612bd1637e3
Bp2build now handles these cases:
-filename is specified as a property
-if filename is not specified and filename_from_src = true,
filename is set as the src
-filename defaults to the module name otherwise
Bug: 228353188
Test: bp2build/prebuilt_etc_conversion_test.go
Change-Id: Ia4c9b2c89f100e4ed9363dc3ba20ea501b776216
Since we are putting conversion tests in the same
package as the module being converted from now on
Test: m bp2build
Change-Id: Ied53589d497fef70bfa11d8f6067459c9a50cd72
bp2buildTestCase
attrNameToString
runBp2BuildTestCase
makeBazelTargetNoRestrictions
The testing framework defined in the bp2build package can only be used
from within the package because many common testing functions are
private to the package. This prevents modules defined in Soong
plugins (e.g. system/tools/aidl/build) from testing bp2build conversions.
Test: go test ./bp2build
Change-Id: Ia867081327c5181d04687b13c4550e68e6a11f86
Also fix some bugs pertaining to configurable attribute handling of bool
attributes and label sttributes, so that they may support values across
multiple different axes at the same time.
Test: unit tests for bp2build
Test: mixed_droid
Change-Id: I411efcfddf02d55dbc0775962068a11348a8bb2c
Each conversion required defining a separate mutator, which will each
operate on _all_ modules and requires each to repeat checks whether the
mutator should operator. Instead, we introduce a single mutator and
modules can define a ConvertWithBp2build to implement bp2build
conversion for that module.
Test: bp2build.sh
Bug: 183079158
Change-Id: I99d4b51f441c2903879092c5b56313d606d4338d
Moves to specifying attributes as a map, such at it is possible to add
additional attributes conditionally. This is in particular useful once
supporting the `enabled` property which will add
`target_compatible_with`
Test: go test soong tests
Change-Id: Iade8eed1ce3acb1d1712a9ee3119d9ae59675624
For cc_binary, changing the handling of version_script to no longer be a
LabelAttribute, which reduces test coverage of that type. Expand
prebuilt_etc to handle arch-variant srcs and correct a bug in
LabelAttribute.
Test: build/bazel/ci/bp2build.sh
Change-Id: I620bc3a43b28c1873f335e30099844ca79ce94c1