summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2018-05-10 00:15:06 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-05-10 00:15:06 -0700
commitf1e1fbc3e234524b34e5f8999ca4143c08857168 (patch)
tree8f41f9b4a8d185c70801f21d37fd86741cbb4969 /tests
parent580a214820534ca3863e79469477b06dc6c1796e (diff)
parentb0dab39f3baf7267672a12aa1730ad40a8d86e80 (diff)
downloadextras-f1e1fbc3e234524b34e5f8999ca4143c08857168.tar.gz
Merge "Convert system/extras/tests to Soong" am: 13be680693
am: b0dab39f3b Change-Id: I54e5f09d3779f43feff18da69ba288fcd63229ae
Diffstat (limited to 'tests')
-rw-r--r--tests/audio/Android.mk17
-rw-r--r--tests/audio/alsa/Android.bp31
-rw-r--r--tests/audio/alsa/Android.mk28
-rw-r--r--tests/binder/Android.mk17
-rw-r--r--tests/binder/benchmarks/Android.bp34
-rw-r--r--tests/binder/benchmarks/Android.mk41
-rw-r--r--tests/cpueater/Android.bp34
-rw-r--r--tests/cpueater/Android.mk34
-rw-r--r--tests/crypto/Android.bp11
-rw-r--r--tests/crypto/Android.mk11
-rw-r--r--tests/directiotest/Android.bp8
-rw-r--r--tests/directiotest/Android.mk9
-rw-r--r--tests/framebuffer/Android.bp22
-rw-r--r--tests/framebuffer/Android.mk24
-rw-r--r--tests/fstest/Android.bp34
-rw-r--r--tests/fstest/Android.mk27
-rw-r--r--tests/icachetest/Android.bp23
-rw-r--r--tests/icachetest/Android.mk17
-rw-r--r--tests/iptables/Android.mk17
-rw-r--r--tests/iptables/qtaguid/Android.bp32
-rw-r--r--tests/iptables/qtaguid/Android.mk28
-rw-r--r--tests/memtest/Android.bp31
-rw-r--r--tests/memtest/Android.mk28
-rw-r--r--tests/pftest/Android.bp19
-rw-r--r--tests/pftest/Android.mk18
-rw-r--r--tests/schedtest/Android.bp9
-rw-r--r--tests/schedtest/Android.mk11
-rw-r--r--tests/storage/Android.bp19
-rw-r--r--tests/storage/Android.mk19
-rw-r--r--tests/suspend_stress/Android.bp13
-rw-r--r--tests/suspend_stress/Android.mk9
-rw-r--r--tests/tcp_nuke_addr/Android.bp8
-rw-r--r--tests/tcp_nuke_addr/Android.mk12
-rw-r--r--tests/timetest/Android.bp37
-rw-r--r--tests/timetest/Android.mk12
-rw-r--r--tests/uevents/Android.bp10
-rw-r--r--tests/uevents/Android.mk11
37 files changed, 362 insertions, 403 deletions
diff --git a/tests/audio/Android.mk b/tests/audio/Android.mk
deleted file mode 100644
index f69a2fc5..00000000
--- a/tests/audio/Android.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright (C) 2013 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.
-#
-
-include $(call all-subdir-makefiles)
diff --git a/tests/audio/alsa/Android.bp b/tests/audio/alsa/Android.bp
new file mode 100644
index 00000000..60dbe87e
--- /dev/null
+++ b/tests/audio/alsa/Android.bp
@@ -0,0 +1,31 @@
+//
+// Copyright (C) 2013 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.
+//
+
+cc_test {
+ name: "pcmtest",
+ srcs: ["pcmtest.cpp"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+ shared_libs: [
+ "libcutils",
+ "libutils",
+ "liblog",
+ "libtinyalsa",
+ ],
+ static_libs: ["libtestUtil"],
+}
diff --git a/tests/audio/alsa/Android.mk b/tests/audio/alsa/Android.mk
deleted file mode 100644
index 7d37af96..00000000
--- a/tests/audio/alsa/Android.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (C) 2013 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)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE := pcmtest
-LOCAL_SRC_FILES := pcmtest.cpp
-LOCAL_CFLAGS:= -Wall -Werror
-LOCAL_SHARED_LIBRARIES += libcutils libutils liblog libtinyalsa
-LOCAL_STATIC_LIBRARIES += libtestUtil
-LOCAL_C_INCLUDES += system/extras/tests/include external/tinyalsa/include
-
-include $(BUILD_NATIVE_TEST)
diff --git a/tests/binder/Android.mk b/tests/binder/Android.mk
deleted file mode 100644
index 4343259b..00000000
--- a/tests/binder/Android.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright (C) 2010 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.
-#
-
-include $(call all-subdir-makefiles)
diff --git a/tests/binder/benchmarks/Android.bp b/tests/binder/benchmarks/Android.bp
new file mode 100644
index 00000000..5ac0895a
--- /dev/null
+++ b/tests/binder/benchmarks/Android.bp
@@ -0,0 +1,34 @@
+//
+// Copyright (C) 2010 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.
+//
+
+cc_benchmark {
+ name: "binderAddInts",
+
+ static_libs: ["libtestUtil"],
+
+ shared_libs: [
+ "libutils",
+ "liblog",
+ "libbinder",
+ ],
+
+ test_suites: ["device-tests"],
+ srcs: ["binderAddInts.cpp"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+}
diff --git a/tests/binder/benchmarks/Android.mk b/tests/binder/benchmarks/Android.mk
deleted file mode 100644
index e3812ff7..00000000
--- a/tests/binder/benchmarks/Android.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# Copyright (C) 2010 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)
-
-include $(CLEAR_VARS)
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
-
-LOCAL_MODULE_TAGS := eng tests
-
-LOCAL_STATIC_LIBRARIES += \
- libtestUtil
-
-LOCAL_SHARED_LIBRARIES += \
- libutils \
- liblog \
- libbinder
-
-LOCAL_C_INCLUDES += \
- system/extras/tests/include \
- frameworks/base/include
-
-LOCAL_MODULE := binderAddInts
-LOCAL_COMPATIBILITY_SUITE := device-tests
-LOCAL_SRC_FILES := binderAddInts.cpp
-LOCAL_CFLAGS:= -Wall -Werror
-
-include $(BUILD_NATIVE_BENCHMARK)
diff --git a/tests/cpueater/Android.bp b/tests/cpueater/Android.bp
new file mode 100644
index 00000000..315a18b0
--- /dev/null
+++ b/tests/cpueater/Android.bp
@@ -0,0 +1,34 @@
+// Copyright (C) 2008 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.
+// Copyright The Android Open Source Project
+
+cc_binary {
+ name: "cpueater",
+ srcs: ["cpueater.c"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wno-unused-parameter",
+ ],
+}
+
+cc_binary {
+ name: "daemonize",
+ srcs: ["daemonize.c"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+ shared_libs: ["libhardware_legacy"],
+}
diff --git a/tests/cpueater/Android.mk b/tests/cpueater/Android.mk
deleted file mode 100644
index 3ee7a379..00000000
--- a/tests/cpueater/Android.mk
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright (C) 2008 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.
-# Copyright The Android Open Source Project
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := cpueater
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := eng
-LOCAL_SRC_FILES := cpueater.c
-LOCAL_CFLAGS := -Wall -Werror -Wno-unused-parameter
-include $(BUILD_EXECUTABLE)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := daemonize
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := eng
-LOCAL_SRC_FILES := daemonize.c
-LOCAL_CFLAGS := -Wall -Werror
-LOCAL_SHARED_LIBRARIES := libhardware_legacy
-include $(BUILD_EXECUTABLE)
-
diff --git a/tests/crypto/Android.bp b/tests/crypto/Android.bp
new file mode 100644
index 00000000..61cb8299
--- /dev/null
+++ b/tests/crypto/Android.bp
@@ -0,0 +1,11 @@
+// Copyright 2013 The Android Open Source Project
+
+cc_binary {
+ name: "get_dm_versions",
+ srcs: ["get_dm_versions.c"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wno-unused-parameter",
+ ],
+}
diff --git a/tests/crypto/Android.mk b/tests/crypto/Android.mk
deleted file mode 100644
index d48f7229..00000000
--- a/tests/crypto/Android.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-# Copyright 2013 The Android Open Source Project
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= get_dm_versions.c
-LOCAL_MODULE:= get_dm_versions
-LOCAL_MODULE_TAGS := optional
-LOCAL_CFLAGS := -Wall -Werror -Wno-unused-parameter
-include $(BUILD_EXECUTABLE)
diff --git a/tests/directiotest/Android.bp b/tests/directiotest/Android.bp
new file mode 100644
index 00000000..489e3c82
--- /dev/null
+++ b/tests/directiotest/Android.bp
@@ -0,0 +1,8 @@
+cc_binary {
+ name: "directiotest",
+ srcs: ["directiotest.c"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+}
diff --git a/tests/directiotest/Android.mk b/tests/directiotest/Android.mk
deleted file mode 100644
index 2bde675f..00000000
--- a/tests/directiotest/Android.mk
+++ /dev/null
@@ -1,9 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := directiotest
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := eng
-LOCAL_SRC_FILES := directiotest.c
-LOCAL_CFLAGS := -Wall -Werror
-include $(BUILD_EXECUTABLE)
diff --git a/tests/framebuffer/Android.bp b/tests/framebuffer/Android.bp
new file mode 100644
index 00000000..f072a59a
--- /dev/null
+++ b/tests/framebuffer/Android.bp
@@ -0,0 +1,22 @@
+cc_binary {
+ name: "test-fb-refresh",
+ srcs: ["refresh.c"],
+ shared_libs: ["libcutils"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wno-unused-parameter",
+ ],
+}
+
+cc_binary {
+ name: "test-fb-simple",
+ srcs: ["fb_test.c"],
+ static_executable: true,
+ static_libs: ["libc"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wno-unused-parameter",
+ ],
+}
diff --git a/tests/framebuffer/Android.mk b/tests/framebuffer/Android.mk
deleted file mode 100644
index 1c4f5df7..00000000
--- a/tests/framebuffer/Android.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- refresh.c
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils
-
-LOCAL_MODULE:= test-fb-refresh
-
-LOCAL_CFLAGS := -Wall -Werror -Wno-unused-parameter
-
-include $(BUILD_EXECUTABLE)
-
-##
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := fb_test.c
-LOCAL_MODULE = test-fb-simple
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-LOCAL_STATIC_LIBRARIES := libc
-LOCAL_CFLAGS := -Wall -Werror -Wno-unused-parameter
-include $(BUILD_EXECUTABLE)
diff --git a/tests/fstest/Android.bp b/tests/fstest/Android.bp
new file mode 100644
index 00000000..febbb2f7
--- /dev/null
+++ b/tests/fstest/Android.bp
@@ -0,0 +1,34 @@
+// Copyright (C) 2008 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.
+
+cc_test {
+ name: "recovery_test",
+ srcs: ["recovery_test.cpp"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+ shared_libs: [
+ "libcutils",
+ "libutils",
+ "libbase",
+ "liblog",
+ "liblogwrap",
+ "libext4_utils",
+ ],
+ static_libs: [
+ "libtestUtil",
+ "libfs_mgr",
+ ],
+}
diff --git a/tests/fstest/Android.mk b/tests/fstest/Android.mk
deleted file mode 100644
index 52f113ce..00000000
--- a/tests/fstest/Android.mk
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (C) 2008 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)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE := recovery_test
-LOCAL_SRC_FILES := recovery_test.cpp
-LOCAL_CFLAGS := -Wall -Werror
-LOCAL_SHARED_LIBRARIES += libcutils libutils libbase liblog \
- liblogwrap libext4_utils
-LOCAL_STATIC_LIBRARIES += libtestUtil libfs_mgr
-LOCAL_C_INCLUDES += system/extras/tests/include \
- system/core/logwrapper/include
-include $(BUILD_NATIVE_TEST)
diff --git a/tests/icachetest/Android.bp b/tests/icachetest/Android.bp
new file mode 100644
index 00000000..e8c72855
--- /dev/null
+++ b/tests/icachetest/Android.bp
@@ -0,0 +1,23 @@
+// Copyright 2006 The Android Open Source Project
+
+cc_binary {
+ name: "icache",
+
+ srcs: [
+ "icache_main.cpp",
+ "Profiler.cpp",
+ "icache.S",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+
+ enabled: false,
+ arch: {
+ arm: {
+ enabled: true,
+ },
+ },
+}
diff --git a/tests/icachetest/Android.mk b/tests/icachetest/Android.mk
deleted file mode 100644
index 9874ffd0..00000000
--- a/tests/icachetest/Android.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright 2006 The Android Open Source Project
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= icache_main.cpp Profiler.cpp icache.S
-
-LOCAL_SHARED_LIBRARIES := libc
-
-LOCAL_MODULE:= icache
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_MODULE_TARGET_ARCH := arm
-
-LOCAL_CFLAGS += -Wall -Werror
-
-include $(BUILD_EXECUTABLE)
diff --git a/tests/iptables/Android.mk b/tests/iptables/Android.mk
deleted file mode 100644
index 56a3fa8d..00000000
--- a/tests/iptables/Android.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright (C) 2011 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.
-#
-
-include $(call all-subdir-makefiles)
diff --git a/tests/iptables/qtaguid/Android.bp b/tests/iptables/qtaguid/Android.bp
new file mode 100644
index 00000000..9c853c8b
--- /dev/null
+++ b/tests/iptables/qtaguid/Android.bp
@@ -0,0 +1,32 @@
+//
+// Copyright (C) 2011 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.
+//
+
+cc_test {
+ name: "socketTag",
+ srcs: ["socketTag.cpp"],
+ shared_libs: [
+ "libcutils",
+ "libutils",
+ "liblog",
+ "libbase",
+ ],
+ static_libs: ["libtestUtil"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-fno-strict-aliasing",
+ ],
+}
diff --git a/tests/iptables/qtaguid/Android.mk b/tests/iptables/qtaguid/Android.mk
deleted file mode 100644
index bc09bdd8..00000000
--- a/tests/iptables/qtaguid/Android.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (C) 2011 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)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE := socketTag
-LOCAL_SRC_FILES := socketTag.cpp
-LOCAL_SHARED_LIBRARIES += libcutils libutils liblog libbase
-LOCAL_STATIC_LIBRARIES += libtestUtil
-LOCAL_C_INCLUDES += system/extras/tests/include
-LOCAL_CFLAGS += -Wall -Werror -fno-strict-aliasing
-
-include $(BUILD_NATIVE_TEST)
diff --git a/tests/memtest/Android.bp b/tests/memtest/Android.bp
new file mode 100644
index 00000000..cf8b286e
--- /dev/null
+++ b/tests/memtest/Android.bp
@@ -0,0 +1,31 @@
+// Copyright 2006 The Android Open Source Project
+
+cc_binary {
+ name: "memtest",
+
+ srcs: [
+ "memtest.cpp",
+ "fptest.cpp",
+ "thumb.cpp",
+ "bandwidth.cpp",
+ ],
+
+ cflags: [
+ "-fomit-frame-pointer",
+ "-Wall",
+ "-Werror",
+ ],
+
+ sanitize: {
+ never: true,
+ },
+
+ enabled: false,
+ arch: {
+ arm: {
+ enabled: true,
+ instruction_set: "thumb",
+ },
+ },
+
+}
diff --git a/tests/memtest/Android.mk b/tests/memtest/Android.mk
deleted file mode 100644
index 372aaf8e..00000000
--- a/tests/memtest/Android.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 2006 The Android Open Source Project
-ifneq ($(filter $(TARGET_ARCH),arm arm64),)
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- memtest.cpp \
- fptest.cpp \
- thumb.cpp \
- bandwidth.cpp \
-
-LOCAL_MODULE := memtest
-LOCAL_MODULE_TAGS := debug
-LOCAL_CFLAGS += \
- -fomit-frame-pointer \
- -Wall \
- -Werror \
-
-LOCAL_MULTILIB := 32
-
-LOCAL_SANITIZE := never
-
-LOCAL_ARM_MODE := thumb
-
-include $(BUILD_EXECUTABLE)
-endif
diff --git a/tests/pftest/Android.bp b/tests/pftest/Android.bp
new file mode 100644
index 00000000..dcd8b5b9
--- /dev/null
+++ b/tests/pftest/Android.bp
@@ -0,0 +1,19 @@
+// Copyright 2010 The Android Open Source Project
+
+cc_binary {
+ name: "pftest",
+
+ srcs: ["pftest.c"],
+
+ cflags: [
+ "-fomit-frame-pointer",
+ "-Wall",
+ "-Werror",
+ ],
+
+ arch: {
+ arm: {
+ instruction_set: "arm",
+ },
+ },
+}
diff --git a/tests/pftest/Android.mk b/tests/pftest/Android.mk
deleted file mode 100644
index 1f829370..00000000
--- a/tests/pftest/Android.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright 2010 The Android Open Source Project
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= pftest.c.arm
-
-
-LOCAL_SHARED_LIBRARIES := libc
-
-LOCAL_MODULE:= pftest
-
-LOCAL_MODULE_TAGS := optional
-
-## LOCAL_CFLAGS += -fstack-protector-all
-LOCAL_CFLAGS += -fomit-frame-pointer -Wall -Werror
-
-include $(BUILD_EXECUTABLE)
diff --git a/tests/schedtest/Android.bp b/tests/schedtest/Android.bp
new file mode 100644
index 00000000..28ece031
--- /dev/null
+++ b/tests/schedtest/Android.bp
@@ -0,0 +1,9 @@
+cc_binary {
+ name: "schedtest",
+ srcs: ["schedtest.c"],
+ cflags: [
+ "-Wno-unused-parameter",
+ "-Wall",
+ "-Werror",
+ ],
+}
diff --git a/tests/schedtest/Android.mk b/tests/schedtest/Android.mk
deleted file mode 100644
index a018cb50..00000000
--- a/tests/schedtest/Android.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- schedtest.c
-
-LOCAL_MODULE := schedtest
-LOCAL_CFLAGS := -Wno-unused-parameter -Wall -Werror
-
-include $(BUILD_EXECUTABLE)
diff --git a/tests/storage/Android.bp b/tests/storage/Android.bp
new file mode 100644
index 00000000..ba9bf1fe
--- /dev/null
+++ b/tests/storage/Android.bp
@@ -0,0 +1,19 @@
+// Copyright 2013 The Android Open Source Project
+
+cc_binary {
+ name: "opentest",
+ srcs: ["opentest.c"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+}
+
+cc_binary {
+ name: "wipe_blkdev",
+ srcs: ["wipe_blkdev.c"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+}
diff --git a/tests/storage/Android.mk b/tests/storage/Android.mk
deleted file mode 100644
index 41bbd661..00000000
--- a/tests/storage/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright 2013 The Android Open Source Project
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := opentest.c
-LOCAL_MODULE := opentest
-LOCAL_CFLAGS := -Wall -Werror
-LOCAL_MODULE_TAGS := optional
-include $(BUILD_EXECUTABLE)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := wipe_blkdev.c
-LOCAL_MODULE := wipe_blkdev
-LOCAL_CFLAGS := -Wall -Werror
-LOCAL_MODULE_TAGS := optional
-include $(BUILD_EXECUTABLE)
-
diff --git a/tests/suspend_stress/Android.bp b/tests/suspend_stress/Android.bp
new file mode 100644
index 00000000..d3ead96c
--- /dev/null
+++ b/tests/suspend_stress/Android.bp
@@ -0,0 +1,13 @@
+cc_binary {
+ name: "suspend_stress",
+ srcs: ["suspend_stress.cpp"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+ static_executable: true,
+ static_libs: [
+ "libc",
+ "libcutils",
+ ],
+}
diff --git a/tests/suspend_stress/Android.mk b/tests/suspend_stress/Android.mk
deleted file mode 100644
index 952f50f6..00000000
--- a/tests/suspend_stress/Android.mk
+++ /dev/null
@@ -1,9 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := suspend_stress.cpp
-LOCAL_MODULE := suspend_stress
-LOCAL_CFLAGS := -Wall -Werror
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-LOCAL_STATIC_LIBRARIES := libc libcutils
-include $(BUILD_EXECUTABLE)
diff --git a/tests/tcp_nuke_addr/Android.bp b/tests/tcp_nuke_addr/Android.bp
new file mode 100644
index 00000000..316fd3a1
--- /dev/null
+++ b/tests/tcp_nuke_addr/Android.bp
@@ -0,0 +1,8 @@
+cc_test {
+ name: "tcp_nuke_addr_test",
+ srcs: ["tcp_nuke_addr_test.cpp"],
+ cppflags: [
+ "-Wall",
+ "-Werror",
+ ],
+}
diff --git a/tests/tcp_nuke_addr/Android.mk b/tests/tcp_nuke_addr/Android.mk
deleted file mode 100644
index f45677ea..00000000
--- a/tests/tcp_nuke_addr/Android.mk
+++ /dev/null
@@ -1,12 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := tcp_nuke_addr_test
-
-LOCAL_C_INCLUDES += frameworks/native/include external/libcxx/include
-LOCAL_CPPFLAGS += -Wall -Werror
-LOCAL_SHARED_LIBRARIES := libc++
-LOCAL_SRC_FILES := tcp_nuke_addr_test.cpp
-LOCAL_MODULE_TAGS := eng tests
-
-include $(BUILD_NATIVE_TEST)
diff --git a/tests/timetest/Android.bp b/tests/timetest/Android.bp
index 998faeff..481610b7 100644
--- a/tests/timetest/Android.bp
+++ b/tests/timetest/Android.bp
@@ -1,17 +1,28 @@
// Copyright 2006 The Android Open Source Project
cc_test {
- name: "time-unit-tests",
- cflags: [
- "-fstack-protector-all",
- "-g",
- "-Wextra",
- "-fno-builtin",
- ],
- srcs: [
- "rtc_test.cpp",
- ],
- shared_libs: [
- "libbase",
- ],
+ name: "time-unit-tests",
+ cflags: [
+ "-fstack-protector-all",
+ "-g",
+ "-Wextra",
+ "-fno-builtin",
+ ],
+ srcs: [
+ "rtc_test.cpp",
+ ],
+ shared_libs: [
+ "libbase",
+ ],
+}
+
+cc_test {
+ name: "timetest",
+ srcs: ["timetest.c"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+ static_executable: true,
+ static_libs: ["libc"],
}
diff --git a/tests/timetest/Android.mk b/tests/timetest/Android.mk
deleted file mode 100644
index be311fa4..00000000
--- a/tests/timetest/Android.mk
+++ /dev/null
@@ -1,12 +0,0 @@
-# Copyright 2006 The Android Open Source Project
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := timetest.c
-LOCAL_MODULE := timetest
-LOCAL_CFLAGS := -Wall -Werror
-LOCAL_MODULE_TAGS := tests
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-LOCAL_STATIC_LIBRARIES := libc
-include $(BUILD_NATIVE_TEST)
diff --git a/tests/uevents/Android.bp b/tests/uevents/Android.bp
new file mode 100644
index 00000000..a292ebcf
--- /dev/null
+++ b/tests/uevents/Android.bp
@@ -0,0 +1,10 @@
+cc_binary {
+ name: "uevents",
+ srcs: ["uevents.c"],
+ shared_libs: ["libcutils"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wno-unused-parameter",
+ ],
+}
diff --git a/tests/uevents/Android.mk b/tests/uevents/Android.mk
deleted file mode 100644
index 46e712d4..00000000
--- a/tests/uevents/Android.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := uevents.c
-
-LOCAL_SHARED_LIBRARIES += libcutils
-LOCAL_MODULE:= uevents
-
-LOCAL_CFLAGS := -Wall -Werror -Wno-unused-parameter
-
-include $(BUILD_EXECUTABLE)