• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2019 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/test.gni")
16
17assert(enable_perfetto_trace_processor_sqlite)
18
19source_set("sqlite") {
20  sources = [
21    "db_sqlite_table.cc",
22    "db_sqlite_table.h",
23    "query_cache.h",
24    "scoped_db.h",
25    "sql_stats_table.cc",
26    "sql_stats_table.h",
27    "sqlite_engine.cc",
28    "sqlite_engine.h",
29    "sqlite_table.cc",
30    "sqlite_table.h",
31    "sqlite_utils.cc",
32    "sqlite_utils.h",
33    "sqlite_utils.h",
34    "stats_table.cc",
35    "stats_table.h",
36  ]
37  deps = [
38    ":query_constraints",
39    "..:metatrace",
40    "../../../gn:default_deps",
41    "../../../gn:sqlite",
42    "../../../include/perfetto/trace_processor",
43    "../../../protos/perfetto/trace/ftrace:zero",
44    "../../base",
45    "../containers",
46    "../db",
47    "../importers/common",
48    "../importers/ftrace:ftrace_descriptors",
49    "../prelude/functions:interface",
50    "../prelude/table_functions:interface",
51    "../storage",
52    "../types",
53    "../util",
54    "../util:profile_builder",
55  ]
56}
57
58source_set("query_constraints") {
59  sources = [
60    "query_constraints.cc",
61    "query_constraints.h",
62  ]
63  deps = [
64    "../../../gn:default_deps",
65    "../../../gn:sqlite",
66    "../../base",
67  ]
68}
69
70perfetto_unittest_source_set("unittests") {
71  testonly = true
72  sources = [
73    "db_sqlite_table_unittest.cc",
74    "query_constraints_unittest.cc",
75    "sqlite_utils_unittest.cc",
76  ]
77  deps = [
78    ":query_constraints",
79    ":sqlite",
80    "../../../gn:default_deps",
81    "../../../gn:gtest_and_gmock",
82    "../../../gn:sqlite",
83    "../../base",
84  ]
85}
86
87if (enable_perfetto_benchmarks) {
88  source_set("benchmarks") {
89    testonly = true
90    deps = [
91      ":sqlite",
92      "../../../gn:benchmark",
93      "../../../gn:default_deps",
94      "../../../gn:sqlite",
95      "../../base",
96    ]
97    sources = [ "sqlite_vtable_benchmark.cc" ]
98  }
99}
100