1// Copyright (C) 2018 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15cc_library_static { 16 name: "libgtest_isolated", 17 host_supported: true, 18 cflags: ["-Wall", "-Werror"], 19 export_include_dirs: ["include"], 20 21 srcs: [ 22 "Color.cpp", 23 "Isolate.cpp", 24 "IsolateMain.cpp", 25 "NanoTime.cpp", 26 "Options.cpp", 27 "Test.cpp", 28 ], 29 30 whole_static_libs: [ 31 "libgtest", 32 ], 33 34 // Add liblog as a shared library so that gtests can override liblog 35 // functions without getting duplicate symbols. 36 shared_libs: [ 37 "liblog", 38 ], 39} 40 41cc_library_static { 42 name: "libgtest_isolated_main", 43 host_supported: true, 44 cflags: ["-Wall", "-Werror"], 45 srcs: [ 46 "Main.cpp", 47 ], 48 49 whole_static_libs: [ 50 "libgtest_isolated", 51 ], 52 53 // Add liblog as a shared library so that gtests can override liblog 54 // functions without getting duplicate symbols. 55 shared_libs: [ 56 "liblog", 57 ], 58} 59 60cc_test { 61 name: "gtest_isolated_tests", 62 host_supported: true, 63 srcs: [ 64 "tests/OptionsTest.cpp", 65 "tests/SystemTests.cpp", 66 ], 67 cflags: ["-Wall", "-Werror"], 68 69 shared_libs: [ 70 "libbase", 71 "liblog", 72 ], 73 static_libs: [ 74 "libgmock", 75 ], 76 whole_static_libs: ["libgtest_isolated_main"], 77 78 test_suites: ["device-tests"], 79} 80