Introduce an environment var to run "Test for dangling rules"
This test currently only runs on checkbuilds. To help with validations
of soong only packaging, introduce an environment variable to run this
test.
Test: RUN_BUILD_TESTS=true m nothing
Test: Verified that "Test for dangling rules" is in logs
Bug: 394096939
Bug: 393617060
Change-Id: I0fc5b38da6ff58fb952245b15073ed7015f9f5a6
diff --git a/ui/build/build.go b/ui/build/build.go
index ea86782..95d7831 100644
--- a/ui/build/build.go
+++ b/ui/build/build.go
@@ -427,6 +427,9 @@
if config.Checkbuild() {
what |= RunBuildTests
}
+ if value, ok := config.environ.Get("RUN_BUILD_TESTS"); ok && value == "true" {
+ what |= RunBuildTests
+ }
if !config.SkipConfig() {
what |= RunProductConfig
} else {