aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Levillain <rpl@google.com>2019-07-24 08:43:17 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-07-24 08:43:17 -0700
commit826416e2f100cf8d59958595e2298bef43e4592a (patch)
tree6a5b1095e0730eca1de159d45daaa4dcf57b4f08
parent7030732e2969b7ae85c0704096324932cfb0a1a7 (diff)
parent9f7c24e6c17b462136da7d38050348bf1117be05 (diff)
downloadcpu_features-826416e2f100cf8d59958595e2298bef43e4592a.tar.gz
Add TEST_MAPPING for architecture-dependent cpu_features tests.
am: 9f7c24e6c1 Change-Id: I3e066e5ffe6dc52f3c929dff935b7573b13cb843
-rw-r--r--Android.bp52
-rw-r--r--TEST_MAPPING7
2 files changed, 58 insertions, 1 deletions
diff --git a/Android.bp b/Android.bp
index e99c646..5420f40 100644
--- a/Android.bp
+++ b/Android.bp
@@ -266,7 +266,6 @@ cc_test {
cc_defaults {
name: "cpu_features-cpuinfo-test-defaults",
defaults: ["cpu_features-test-defaults"],
- enabled: false,
static_libs: [
"libcpu_features-all_libraries",
],
@@ -275,6 +274,7 @@ cc_defaults {
cc_test {
name: "cpu_features-cpuinfo_x86_test",
defaults: ["cpu_features-cpuinfo-test-defaults"],
+ enabled: false,
arch: {
x86: {
enabled: true,
@@ -304,6 +304,7 @@ cc_test {
"cpu_features-cpuinfo-test-defaults",
"stack_line_reader-defaults",
],
+ enabled: false,
arch: {
arm: {
enabled: true,
@@ -317,6 +318,7 @@ cc_test {
cc_test {
name: "cpu_features-cpuinfo_aarch64_test",
+ enabled: false,
defaults: [
"cpu_features-cpuinfo-test-defaults",
"stack_line_reader-defaults",
@@ -334,3 +336,51 @@ cc_test {
"src/cpuinfo_aarch64.c",
],
}
+
+cc_test {
+ name: "cpu_features-cpuinfo_test",
+ defaults: [
+ "cpu_features-cpuinfo-test-defaults"
+ ],
+ arch: {
+ x86: {
+ cflags: [
+ "-DCPU_FEATURES_MOCK_CPUID_X86",
+ "-Wno-unused-variable",
+ ],
+ srcs: [
+ "test/cpuinfo_x86_test.cc",
+ "src/cpuinfo_x86.c",
+ ],
+ },
+ x86_64: {
+ cflags: [
+ "-DCPU_FEATURES_MOCK_CPUID_X86",
+ "-Wno-unused-variable",
+ ],
+ srcs: [
+ "test/cpuinfo_x86_test.cc",
+ "src/cpuinfo_x86.c",
+ ],
+ },
+ arm: {
+ cflags: [
+ "-DSTACK_LINE_READER_BUFFER_SIZE=1024",
+ ],
+ srcs: [
+ "test/cpuinfo_arm_test.cc",
+ "src/cpuinfo_arm.c",
+ ],
+ },
+ arm64: {
+ cflags: [
+ "-DSTACK_LINE_READER_BUFFER_SIZE=1024",
+ "-Wno-gnu-designator",
+ ],
+ srcs: [
+ "test/cpuinfo_aarch64_test.cc",
+ "src/cpuinfo_aarch64.c",
+ ],
+ }
+ },
+}
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 6bafa8d..0af6ef9 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -27,6 +27,13 @@
},
{
"name": "cpu_features-unix_features_aggregator_test"
+ },
+ {
+ "name": "cpu_features-cpuinfo_test",
+ "host": true
+ },
+ {
+ "name": "cpu_features-cpuinfo_test"
}
]
}