These tests will break if the sysprop output files and directory
paths are changed. At the very least, this is a good warning to
let us know to change other places accordingly, like the Bazel
rule.
Bug: 235131252
Test: tests
Change-Id: I80f037a6e8fe68cdd2042c64175e0d3bd3fefde3
This allows "bazel mixed builds prod mode", in additional to reworking
the mechanism in which mixed builds dev mode is enabled.
As a followup, CI scripts will be migrated to use the new flags, as
USE_BAZEL_ANALYSIS=1 is deprecated.
Test: Manually ran --bazel-mode with an allowlist verifying that the
module alone was enabled
Test: Manually verified --bazel-mode and --bazel-mode-dev cause a build
failure
Change-Id: If0d34360e60452f428b05828f4ec7596b7cb619a
In Cross-Version ABI Check, the config of header-abi-diff would be
changed based on go/cross-version-abi-diff-configuration. Thus in soong,
the target-version flag should be added for header-abi-diff to determine
config section. The error message of header-abi-diff is also modified to
help developers resolve the incompatibility by updating the
header-abi-diff config.
Test: make and check the flag of generated header-abi-diff command
Bug: 239792343
Change-Id: Id94f577a42193ecf218dc94d0bfd2065fcdc2896
apex_comparison_test.sh defines a helper function to clean up state on
exit, but in error conditions the call_bazel function is not always
defined.
Test: added an exit 1 statement below trap
Change-Id: I73b0c56c0a4a2d9ed1d4c0bf38b6ac0ac985e716
* changes:
add bp2build unit tests for aidl_interface
AIDL source generation accounts for Bazel paths
convert .aidl srcs for java_library
add Partition method to LabelListAttribute
Clang has defaulted to true since 2018. Clang property is deprecated.
Set up a BUILD_BROKEN_CLANG_PROPERTY flag so partners can bypass \
errors from using clang.
Bug: 208980553
Test: m nothing & treehugger
Change-Id: I8fd7d3e6bdbb963279248d3482e8a590238727e3
Bug: 231322789
Test: with this CL on internal master,
1) b build --verbose_failures //vendor/google/modules/AdbdGoogle:com.google.android.adbd --config=android_x86_64
2) adb install bazel-bin/vendor/google/modules/AdbdGoogle/com.google.android.adbd.apex, and adbd is activated successfully on cuttlefish device.
3) m mts && mts-tradefed run mts-adbd, and there is no failure with cuttlefish device
4) packages/modules/adb/test_device.py, and there is no failure with cuttlefish device.
Change-Id: I81b6f5336cacf35c68957ae2dac65f985b6eafb9
Add test to ensure that filegroups from other packages are correctly
added as dependencies for java_library. Test copied from aosp/2183478.
Test: go test ./bp2build
Change-Id: Ie39b7182f544fa196870fb7311817e6b6e68817b
The AIDL source generation rule sets include flags based on the relative
path of .aidl sources. For .aidl sources provided by Bazel targets, e.g.
in a filegroup, the same directory could be added to the include path
twice. Instead we need to ensure that if a Bazel source provides the
include path, that we don't add it again from a Soong source.
Bug: 229251008
Test: USE_BAZEL_ANALYSIS=1 m api-stubs-docs-non-updatable
Change-Id: I4997039003242b43e0e52ccf41729acb4ad11324
Test: go test ./bp2build
Test: b build //frameworks/base/services/tests/servicestests/aidl:servicestests-aidl
Test: enable //packages/modules/NetworkStack/common/networkstackclient
&& disable restriction on Android SDK in javaLibraryBp2Build
&& b build //packages/modules/NetworkStack/common/networkstackclient:ipmemorystore-aidl-interfaces-V10-java
Change-Id: Ifb817daf09a3983ea1c84948ed9f02a79f95784b
It can be tedious to split a LabelListAttribute on all of the
configuration axes, so LabelListAttribute.Partition can be used to do
this based on a predicate function.
Test: go test ./bazel
Change-Id: I78ff8c24ce9c86bab5896290d8afe979d56545b6
'$' cannot be included in the genrule source file name as it is an
invalid character.
One workaround to include a file with '$' in the filename is to use
glob(*) and match pattern.
However, shell currently evaluates the '$' sign and leads to unexpected behavior.
This change fixes the issue by shell-escaping the filepath in generating
build actions.
Test: m
Bug: b/194980152
Change-Id: I6fd919c568b5b6526e4de5155104a08ecadab307
Some protobuf modules like perfetto_trace-full take a long time
to analyze with errorprone, in that case it took over 10 minutes.
Skip errorprone on protobuf or aidl-only modules because having
warnings on generated source code isn't useful anyways.
Bug: 242630963
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I5e73accd0b56a0a71e75927778c5c04a0d358e67
Per aosp/2183398, out/soong/soong.variables provide some useful information for debugging purpose.
This change enables copying out/soong/soong.variables to out/dist/soong_ui/soong/soong.variables in dist mode, similar to build.ninja.gz in the same directory.
Test confirmed that the content of the out/soong/soong.variables is
equal to that of out/dist/soong_ui/soong/soong.variables.
Test: m dist $target &&
diff out/soong/soong.variables out/dist/soong_ui/soong/soong.variables
Change-Id: I1bfa53a8e116c49fda2cc9a7252f4da0c59ce5b5
These Kotlin JARs contain class files under the META-INF directory that
are incorrectly parsed in gen_jarjar.py causing the Jarjar tool to error.
Bug: 243098369
Bug: 217750501
Test: build/bazel/ci/mixed_droid.sh
Change-Id: I62aaf086dc91d868a8d653f7fdb2c111bdc96097
This refactoring prepares for introduction of bazel prod mode, an
alternative mechanism for mixed builds allowlist handling.
* Decide bazel-mode as close to soong_build main as possible
* BazelContext itself decides whether a module is allowlisted
* Separate bp2build and mixed build allowlist
Test: m nothing, manually verified all modules are mixed build disabled
(via metrics)
Test: USE_BAZEL_ANALYSIS=1 m nothing, manually verified that mixed build
disabled/enabled modules are identical before and after change.
Change-Id: I0f55d8b85000cb4a871a099edc6d7d868d7df509
Use Target.Os and Target.HostCross as the key in FirstTarget so that
it returns a separate target for host and host cross architectures.
This is useful when host and host cross are both linux_musl, but
host cross is an independenct architecture like arm64.
Also filter the targets returned by ctx.MultiTargets() to match
the HostCross value of ctx.Target() to prevent the newly created
HostCross variants from colliding with Host variants in JNI or
test data attached to Java targets using a common arch.
This relands If75790001afe9d0f9d4d8166f207847851812297 with the
addition of the ctx.MultiTargets() filtering.
Bug: 236052820
Test: TestArchMutator
Change-Id: Ia6fe1185915d174d0ad6b401c227e0e57bee5c24
This reverts commit b90ff82772.
All the breakages are now fixed or mitigated.
Bug: 169004486
Change-Id: Ibec4b1f0a50c5ef6769bc6916a81721a4ce03c60
Test: presubmit
The `test_options.tags` attribute provides additional metadata to
customize test execution by downstream test runners. The tags have no
special meaning to Soong.
Bug: 240928948
Test: manually add `test_options.tags` attribute and run:
$ refreshmod && \
cat out/target/product/generic/module-info.json |\
grep <tags>
Change-Id: I35267f6608e48c6184e56530ef128d93b2f97522