aboutsummaryrefslogtreecommitdiff
path: root/rules/test_common
diff options
context:
space:
mode:
authorVinh Tran <vinhdaitran@google.com>2022-12-02 15:34:07 -0500
committerVinh Tran <vinhdaitran@google.com>2022-12-02 18:00:59 -0500
commitd2e18aa0fb51fa4d18f233faf3420026f88da6e2 (patch)
tree16ef5ec25910b989f911b04c3baea068f1b3af79 /rules/test_common
parentffc0e7c79154e4481a1c0a1681804bdc7c27e1db (diff)
downloadbazel-d2e18aa0fb51fa4d18f233faf3420026f88da6e2.tar.gz
Support next_version in aidl_interface macro
aidl_interface in Soong has the concept of next version which depends on the unstable prop and the versions specified in versions and versions_with_info props. This commit adds support for next version so that upstream modules can import the +1 version of the aidl interface. When unstable is set in an aidl_interface, its next_version is "". Bug: 261139208 Test: b build //frameworks/av/apex:com.android.media.swcodec --config=android Change-Id: I6a08f632e4c16a7cd95e70c1d3dbc6126422683b
Diffstat (limited to 'rules/test_common')
-rw-r--r--rules/test_common/rules.bzl9
1 files changed, 9 insertions, 0 deletions
diff --git a/rules/test_common/rules.bzl b/rules/test_common/rules.bzl
index 5b9b8228..5d4bc6a5 100644
--- a/rules/test_common/rules.bzl
+++ b/rules/test_common/rules.bzl
@@ -29,3 +29,12 @@ expect_failure_test = analysistest.make(
},
doc = "This test checks that a rule fails with the expected failure_message",
)
+
+def _target_under_test_exist_impl(ctx):
+ env = analysistest.begin(ctx)
+ return analysistest.end(env)
+
+target_under_test_exist_test = analysistest.make(
+ impl = _target_under_test_exist_impl,
+ doc = "This test checks that the target under test exists without failure",
+)