diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/Android.bp | 179 |
1 files changed, 179 insertions, 0 deletions
diff --git a/test/Android.bp b/test/Android.bp new file mode 100644 index 0000000000..46d7c94878 --- /dev/null +++ b/test/Android.bp @@ -0,0 +1,179 @@ +// +// 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. +// + +art_cc_defaults { + name: "art_test_defaults", + host_supported: true, + test_per_src: true, + // These really are gtests, but the gtest library comes from libart-gtest.so + gtest: false, + defaults: [ + "art_defaults", + "art_debug_defaults", + ], + + shared_libs: [ + "libartd", + "libartd-disassembler", + "libvixld-arm", + "libvixld-arm64", + "libart-gtest", + + "libicuuc", + "libicui18n", + "libnativehelper", + ], + whole_static_libs: [ + "libsigchain", + ], + include_dirs: [ + "art", + "art/cmdline", + ], + + target: { + linux: { + ldflags: [ + // Allow jni_compiler_test to find Java_MyClassNatives_bar + // within itself using dlopen(NULL, ...). + // Mac OS linker doesn't understand --export-dynamic. + "-Wl,--export-dynamic", + "-Wl,-u,Java_MyClassNatives_bar", + "-Wl,-u,Java_MyClassNatives_sbar", + ], + shared_libs: [ + "libziparchive", + "libz-host", + ], + host_ldlibs: [ + "-ldl", + "-lpthread", + ], + cflags: [ + // gtest issue + "-Wno-used-but-marked-unused", + "-Wno-deprecated", + "-Wno-missing-noreturn", + ], + }, + android: { + ldflags: [ + // Allow jni_compiler_test to find Java_MyClassNatives_bar + // within itself using dlopen(NULL, ...). + "-Wl,--export-dynamic", + "-Wl,-u,Java_MyClassNatives_bar", + "-Wl,-u,Java_MyClassNatives_sbar", + ], + shared_libs: [ + "libcutils", + "libdl", + "libz", + ], + cflags: [ + // gtest issue + "-Wno-used-but-marked-unused", + "-Wno-deprecated", + "-Wno-missing-noreturn", + ], + }, + + android_arm: { + relative_install_path: "art/arm", + }, + android_arm64: { + relative_install_path: "art/arm64", + }, + android_mips: { + relative_install_path: "art/mips", + }, + android_mips64: { + relative_install_path: "art/mips64", + }, + android_x86: { + relative_install_path: "art/x86", + }, + android_x86_64: { + relative_install_path: "art/x86_64", + }, + }, +} + +art_cc_defaults { + name: "libart-gtest-defaults", + host_supported: true, + defaults: [ + "art_defaults", + "art_debug_defaults", + ], + shared_libs: [ + "libartd", + "libartd-compiler", + ], + static_libs: [ + "libgtest", + ], + target: { + android32: { + cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest32/art"], + }, + android64: { + cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest64/art"], + }, + android: { + cflags: [ + // gtest issue + "-Wno-used-but-marked-unused", + "-Wno-deprecated", + "-Wno-missing-noreturn", + ], + }, + linux: { + cflags: [ + // gtest issue + "-Wno-used-but-marked-unused", + "-Wno-deprecated", + "-Wno-missing-noreturn", + ], + }, + }, +} + +art_cc_library { + name: "libart-gtest", + host_supported: true, + whole_static_libs: [ + "libart-compiler-gtest", + "libart-runtime-gtest", + "libgtest", + ], + shared_libs: [ + "libartd", + "libartd-compiler", + ], + target: { + android: { + shared_libs: [ + "libdl", + ], + }, + host: { + host_ldlibs: [ + "-ldl", + "-lpthread", + ], + }, + }, +} |