blob: c728f228881afec9b6c04b43bc262010ad58e3b3 [file] [log] [blame]
Christopher Ferris1a993562018-08-21 12:43:50 -07001// 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
Bob Badour192ca882021-02-12 15:34:19 -080015package {
16 default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
Christopher Ferrisaedc8f72019-07-17 15:45:29 -070019cc_library_static {
Christopher Ferris1a993562018-08-21 12:43:50 -070020 name: "libgtest_isolated",
21 host_supported: true,
22 cflags: ["-Wall", "-Werror"],
23 export_include_dirs: ["include"],
24
25 srcs: [
26 "Color.cpp",
27 "Isolate.cpp",
28 "IsolateMain.cpp",
29 "NanoTime.cpp",
30 "Options.cpp",
31 "Test.cpp",
32 ],
33
Christopher Ferriscde0a072018-09-14 12:31:39 -070034 whole_static_libs: [
Christopher Ferriscde0a072018-09-14 12:31:39 -070035 "libgtest",
Christopher Ferrisaedc8f72019-07-17 15:45:29 -070036 ],
37
38 // Add liblog as a shared library so that gtests can override liblog
39 // functions without getting duplicate symbols.
40 shared_libs: [
Christopher Ferriscde0a072018-09-14 12:31:39 -070041 "liblog",
42 ],
Christopher Ferris1a993562018-08-21 12:43:50 -070043}
44
Christopher Ferrisaedc8f72019-07-17 15:45:29 -070045cc_library_static {
Christopher Ferris1a993562018-08-21 12:43:50 -070046 name: "libgtest_isolated_main",
47 host_supported: true,
48 cflags: ["-Wall", "-Werror"],
49 srcs: [
50 "Main.cpp",
51 ],
52
Christopher Ferriscde0a072018-09-14 12:31:39 -070053 whole_static_libs: [
54 "libgtest_isolated",
55 ],
Christopher Ferrisaedc8f72019-07-17 15:45:29 -070056
57 // Add liblog as a shared library so that gtests can override liblog
58 // functions without getting duplicate symbols.
59 shared_libs: [
60 "liblog",
61 ],
Christopher Ferris1a993562018-08-21 12:43:50 -070062}
63
64cc_test {
65 name: "gtest_isolated_tests",
66 host_supported: true,
67 srcs: [
68 "tests/OptionsTest.cpp",
69 "tests/SystemTests.cpp",
70 ],
71 cflags: ["-Wall", "-Werror"],
72
Christopher Ferrisaedc8f72019-07-17 15:45:29 -070073 shared_libs: [
74 "libbase",
75 "liblog",
76 ],
Christopher Ferris2b6124f2019-09-19 23:06:41 -070077 static_libs: [
78 "libgmock",
79 ],
Christopher Ferris1a993562018-08-21 12:43:50 -070080 whole_static_libs: ["libgtest_isolated_main"],
Christopher Ferris194dbad2019-09-03 13:52:44 -070081
82 test_suites: ["device-tests"],
Christopher Ferris1a993562018-08-21 12:43:50 -070083}