From f05826a60e1cb07f6daad9bcfb5cd8bad3eaa9f1 Mon Sep 17 00:00:00 2001 From: Michael Plass Date: Thu, 22 Aug 2019 17:09:35 -0700 Subject: Fix coverage of FrameworksWifiTests Add jacoco section to bp file for tests Rename WifiStackBase target back to wifi-service for the benefit of some out-of-tree scripts. This gets the coverage working again, but getting the excludes working as desired will take additional work. Bug: 139869050 Test: atest FrameworksWifiTests # to check that this did not break Test: ./frameworks/opt/net/wifi/tests/wifitests/coverage.sh /tmp/cov Change-Id: I320db23becf3ea5870ee7bae6d5b2ba8da669fcf --- tests/wifitests/Android.bp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/wifitests/Android.bp b/tests/wifitests/Android.bp index b0ff2cf90..3e36e9208 100644 --- a/tests/wifitests/Android.bp +++ b/tests/wifitests/Android.bp @@ -21,6 +21,28 @@ android_test { srcs: ["**/*.java"], + // For coverage + jacoco: { + include_filter: [ + "com.android.server.wifi.*", + "com.android.server.wifi.aware.*", + "com.android.server.wifi.hotspot2.*", + "com.android.server.wifi.hotspot2.anqp.*", + "com.android.server.wifi.hotspot2.anqp.eap.*", + "com.android.server.wifi.hotspot2.omadm.*", + "com.android.server.wifi.hotspot2.soap.*", + "com.android.server.wifi.hotspot2.soap.command.*", + "com.android.server.wifi.p2p.*", + "com.android.server.wifi.rtt.*", + "com.android.server.wifi.scanner.*", + "com.android.server.wifi.util.*", + "com.android.server.wifi.wificond.*", + ], + exclude_filter: [ + "com.android.server.wifi.ClientModeImplTest", + ], + }, + dxflags: ["--multi-dex"], // wifi-service and services must be included here so that the latest changes @@ -34,7 +56,7 @@ android_test { "mockito-target-extended-minus-junit4", "frameworks-base-testutils", "services", - "WifiStackBase", + "wifi-service", "truth-prebuilt", ], -- cgit v1.2.3