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/perfetto_tp_tables.gni") 16import("../../../gn/test.gni") 17 18perfetto_tp_tables("tables_python") { 19 sources = [ 20 "android_tables.py", 21 "counter_tables.py", 22 "flow_tables.py", 23 "memory_tables.py", 24 "metadata_tables.py", 25 "profiler_tables.py", 26 "slice_tables.py", 27 "trace_proto_tables.py", 28 "track_tables.py", 29 ] 30 generate_docs = true 31} 32 33source_set("tables") { 34 sources = [ 35 "macros_internal.h", 36 "table_destructors.cc", 37 ] 38 deps = [ 39 "../../../gn:default_deps", 40 "../../../include/perfetto/ext/base", 41 "../db", 42 ] 43 public_deps = [ ":tables_python" ] 44} 45 46perfetto_tp_tables("py_tables_unittest") { 47 sources = [ "py_tables_unittest.py" ] 48} 49 50source_set("unittests") { 51 testonly = true 52 sources = [ "py_tables_unittest.cc" ] 53 deps = [ 54 ":py_tables_unittest", 55 ":tables", 56 "../../../gn:default_deps", 57 "../../../gn:gtest_and_gmock", 58 "../db", 59 ] 60} 61 62if (enable_perfetto_benchmarks) { 63 source_set("benchmarks") { 64 testonly = true 65 deps = [ 66 ":py_tables_benchmark", 67 "../../../gn:benchmark", 68 "../../../gn:default_deps", 69 ] 70 sources = [ "py_tables_benchmark.cc" ] 71 } 72 perfetto_tp_tables("py_tables_benchmark") { 73 sources = [ "py_tables_benchmark.py" ] 74 } 75} 76