Refactor MixedBuildsEnabled and add --ensure-allowlist-integrity.
Currently, there is little verification around allowlisted modules
actually being mixed-built. This flag would allow us to verify
that a module allowlisted is mixed-built for at least one variant.
Bug: 278910100
Test: m nothing --bazel-mode-staging --ensure-allowlist-integrity
Test: m nothing --bazel-mode-staging --ensure-allowlist-integrity
--bazel-force-enabled-modules=com.google.android.neuralnetworks (This
fails, as expected)
Test: build/soong/test/mixed_mode_test.sh
Change-Id: Icd5976f4f44f1a8caca1e5247d986642f7995f97
diff --git a/tests/mixed_mode_test.sh b/tests/mixed_mode_test.sh
index a1a792d..ca63fdf 100755
--- a/tests/mixed_mode_test.sh
+++ b/tests/mixed_mode_test.sh
@@ -88,7 +88,7 @@
fail "Bazel actions not found for force-enabled module"
fi
- unused=`run_soong --bazel-force-enabled-modules=unenabled-touch-file nothing >/dev/null`
+ unused=`run_soong --bazel-force-enabled-modules=unenabled-touch-file --ensure-allowlist-integrity nothing >/dev/null`
if [[ $? -ne 1 ]]; then
fail "Expected failure due to force-enabling an unenabled module "