From 8b055fdc1c5c43bbc0d0318f2d1f7b8737196b53 Mon Sep 17 00:00:00 2001 From: David Su Date: Fri, 3 Jan 2020 02:21:35 +0000 Subject: [PATCH] Revert "Convert FrameworksWifiApiTests mk to bp" This reverts commit 5eac974c590a33d09a5486042aca7ee0e7f795ad. Reason for revert: Broke build Change-Id: I82e58c215fa7c6f3162fe76a82002e251a7fe68c --- wifi/tests/Android.bp | 67 ------------------------------------------- wifi/tests/Android.mk | 66 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 67 deletions(-) delete mode 100644 wifi/tests/Android.bp create mode 100644 wifi/tests/Android.mk diff --git a/wifi/tests/Android.bp b/wifi/tests/Android.bp deleted file mode 100644 index f54d40eb08877..0000000000000 --- a/wifi/tests/Android.bp +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (C) 2016 The Android Open Source Project -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Make test APK -// ============================================================ - -// This list is generated from the java source files in this module -// The list is a comma separated list of class names with * matching zero or more characters. -// Example: -// Input files: src/com/android/server/wifi/Test.java src/com/android/server/wifi/AnotherTest.java -// Generated exclude list: com.android.server.wifi.Test*,com.android.server.wifi.AnotherTest* - -// Filter all src files to just java files -local_java_files = ["__builtin_func:filter %.java <'LOCAL_SRC_FILES' unset>"] -// Transform java file names into full class names. -// This only works if the class name matches the file name and the directory structure -// matches the package. -local_classes = ["__builtin_func:subst / . __builtin_func:patsubst src/%.java % <'local_java_files' unset>"] -// Convert class name list to jacoco exclude list -// This appends a * to all classes and replace the space separators with commas. -// These patterns will match all classes in this module and their inner classes. -jacoco_exclude = ["__builtin_func:subst <'space' unset> <'comma' unset> __builtin_func:patsubst % %* <'local_classes' unset>"] - -jacoco_include = ["android.net.wifi.*"] - -android_test { - name: "FrameworksWifiApiTests", - - srcs: ["**/*.java"], - - jacoco: { - include_filter: jacoco_include, - exclude_filter: jacoco_exclude, - }, - - static_libs: [ - "androidx.test.rules", - "core-test-rules", - "guava", - "mockito-target-minus-junit4", - "net-tests-utils", - "frameworks-base-testutils", - "truth-prebuilt", - ], - - libs: [ - "android.test.runner", - "android.test.base", - ], - - platform_apis: true, - test_suites: [ - "device-tests", - "mts", - ], -} diff --git a/wifi/tests/Android.mk b/wifi/tests/Android.mk new file mode 100644 index 0000000000000..d2c385b46eb10 --- /dev/null +++ b/wifi/tests/Android.mk @@ -0,0 +1,66 @@ +# Copyright (C) 2016 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +LOCAL_PATH:= $(call my-dir) + +# Make test APK +# ============================================================ +include $(CLEAR_VARS) + +LOCAL_MODULE_TAGS := tests + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +# This list is generated from the java source files in this module +# The list is a comma separated list of class names with * matching zero or more characters. +# Example: +# Input files: src/com/android/server/wifi/Test.java src/com/android/server/wifi/AnotherTest.java +# Generated exclude list: com.android.server.wifi.Test*,com.android.server.wifi.AnotherTest* + +# Filter all src files to just java files +local_java_files := $(filter %.java,$(LOCAL_SRC_FILES)) +# Transform java file names into full class names. +# This only works if the class name matches the file name and the directory structure +# matches the package. +local_classes := $(subst /,.,$(patsubst src/%.java,%,$(local_java_files))) +# Convert class name list to jacoco exclude list +# This appends a * to all classes and replace the space separators with commas. +# These patterns will match all classes in this module and their inner classes. +jacoco_exclude := $(subst $(space),$(comma),$(patsubst %,%*,$(local_classes))) + +jacoco_include := android.net.wifi.* + +LOCAL_JACK_COVERAGE_INCLUDE_FILTER := $(jacoco_include) +LOCAL_JACK_COVERAGE_EXCLUDE_FILTER := $(jacoco_exclude) + +LOCAL_STATIC_JAVA_LIBRARIES := \ + androidx.test.rules \ + core-test-rules \ + guava \ + mockito-target-minus-junit4 \ + net-tests-utils \ + frameworks-base-testutils \ + truth-prebuilt \ + +LOCAL_JAVA_LIBRARIES := \ + android.test.runner \ + android.test.base \ + +LOCAL_PACKAGE_NAME := FrameworksWifiApiTests +LOCAL_PRIVATE_PLATFORM_APIS := true +LOCAL_COMPATIBILITY_SUITE := \ + device-tests \ + mts \ + +include $(BUILD_PACKAGE)