xref: /aosp_15_r20/external/perfetto/src/shared_lib/test/BUILD.gn (revision 6dbdd20afdafa5e3ca9b8809fa73465d530080dc)
1# Copyright (C) 2023 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
15import("../../../gn/perfetto.gni")
16
17source_set("utils") {
18  testonly = true
19  deps = [
20    "..:shared_lib",
21    "../../../gn:default_deps",
22    "../../../gn:gtest_and_gmock",
23    "../../../include/perfetto/public",
24  ]
25  sources = [
26    "utils.cc",
27    "utils.h",
28  ]
29  defines = [ "PERFETTO_SDK_DISABLE_SHLIB_EXPORT" ]
30}
31
32if (enable_perfetto_benchmarks) {
33  source_set("benchmarks") {
34    testonly = true
35    deps = [
36      ":utils",
37      "..:shared_lib",
38      "../../../gn:benchmark",
39      "../../../gn:default_deps",
40      "../../../include/perfetto/public",
41    ]
42    defines = [ "PERFETTO_SDK_DISABLE_SHLIB_EXPORT" ]
43    sources = [ "benchmark.cc" ]
44  }
45}
46
47if (enable_perfetto_integration_tests) {
48  source_set("integrationtests") {
49    testonly = true
50    deps = [
51      ":utils",
52      "..:shared_lib",
53      "../../../gn:default_deps",
54      "../../../gn:gtest_and_gmock",
55      "../../../include/perfetto/public",
56      "protos",
57    ]
58    defines = [ "PERFETTO_SDK_DISABLE_SHLIB_EXPORT" ]
59    sources = [ "api_integrationtest.cc" ]
60  }
61}
62