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