blob: e339a4fcd345b165fcc8dcb8e11a3ec9a7a709cd [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
Christopher Ferrisaedc8f72019-07-17 15:45:29 -070015cc_library_static {
Christopher Ferris1a993562018-08-21 12:43:50 -070016 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
Christopher Ferrisaedc8f72019-07-17 15:45:29 -070030 // NOTE: libbase is re-exported by including them below.
31 // When Soong supports transitive static dependency includes, this
32 // library can be removed.
Christopher Ferriscde0a072018-09-14 12:31:39 -070033 whole_static_libs: [
34 "libbase",
35 "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}