From 68e079183dcc7f695ce8842f071187421f114780 Mon Sep 17 00:00:00 2001 From: Yike Date: Mon, 5 Sep 2022 18:51:39 +0800 Subject: [PATCH] Improve the dependency declaration for Net tests This change moves ConnectivityChecker from `required` to `data`, since the `required` is inherited from Make and is very vague. It's discouraged by Android Build team to use it. Besides, this change declares net-tests-utils-host-common, since Net tests use ConnectivityCheckTargetPreparer that is included in net-tests-utils-host-common. All dependencies of a test should be declared explicitly, so that test infrastructure could only provide the needed dependencies instead of all to run a test. Bug: 222438068 Test: presubmit Change-Id: Id522fd88ca53b5af338315fc6370d68bdabf403b --- tests/cts/net/Android.bp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/cts/net/Android.bp b/tests/cts/net/Android.bp index a6179fc60a..23cb15c6bc 100644 --- a/tests/cts/net/Android.bp +++ b/tests/cts/net/Android.bp @@ -61,7 +61,9 @@ java_defaults { // uncomment when b/13249961 is fixed // sdk_version: "current", platform_apis: true, - required: ["ConnectivityChecker"], + data: [":ConnectivityChecker"], + per_testcase_directory: true, + host_required: ["net-tests-utils-host-common"], test_config_template: "AndroidTestTemplate.xml", }