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 "module_lifecycle_manager.h", 24 "scoped_db.h", 25 "sql_source.cc", 26 "sql_source.h", 27 "sql_stats_table.cc", 28 "sql_stats_table.h", 29 "sqlite_engine.cc", 30 "sqlite_engine.h", 31 "sqlite_tokenizer.cc", 32 "sqlite_tokenizer.h", 33 "sqlite_utils.cc", 34 "sqlite_utils.h", 35 "sqlite_value.h", 36 "stats_table.cc", 37 "stats_table.h", 38 ] 39 deps = [ 40 "..:metatrace", 41 "../../../gn:default_deps", 42 "../../../gn:sqlite", 43 "../../../include/perfetto/trace_processor", 44 "../../../include/perfetto/trace_processor:basic_types", 45 "../../../protos/perfetto/trace/ftrace:zero", 46 "../../../protos/perfetto/trace_processor:zero", 47 "../../base", 48 "../containers", 49 "../db", 50 "../db/column", 51 "../importers/common", 52 "../importers/ftrace:ftrace_descriptors", 53 "../perfetto_sql/intrinsics/table_functions:interface", 54 "../storage", 55 "../types", 56 "../util", 57 "../util:profile_builder", 58 "../util:regex", 59 ] 60 public_deps = [ "bindings" ] 61} 62 63perfetto_unittest_source_set("unittests") { 64 testonly = true 65 sources = [ 66 "db_sqlite_table_unittest.cc", 67 "sql_source_unittest.cc", 68 "sqlite_tokenizer_unittest.cc", 69 "sqlite_utils_unittest.cc", 70 ] 71 deps = [ 72 ":sqlite", 73 "../../../gn:default_deps", 74 "../../../gn:gtest_and_gmock", 75 "../../../gn:sqlite", 76 "../../../include/perfetto/trace_processor:basic_types", 77 "../../base", 78 "../../base:test_support", 79 "../db", 80 ] 81} 82 83if (enable_perfetto_benchmarks) { 84 source_set("benchmarks") { 85 testonly = true 86 deps = [ 87 ":sqlite", 88 "../../../gn:benchmark", 89 "../../../gn:default_deps", 90 "../../../gn:sqlite", 91 "../../base", 92 ] 93 sources = [ "sqlite_vtable_benchmark.cc" ] 94 } 95} 96