| # Copyright (C) 2025 The Android Open Source Project |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| import("../../gn/fuzzer.gni") |
| import("../../gn/perfetto_host_executable.gni") |
| import("../../gn/proto_library.gni") |
| import("../../gn/test.gni") |
| |
| source_set("protovm") { |
| sources = [ |
| "allocator.cc", |
| "allocator.h", |
| "error_handling.cc", |
| "error_handling.h", |
| "executor.cc", |
| "executor.h", |
| "node.cc", |
| "node.h", |
| "owned_ptr.h", |
| "parser.cc", |
| "parser.h", |
| "ro_cursor.cc", |
| "ro_cursor.h", |
| "rw_proto.cc", |
| "rw_proto.h", |
| "rw_proto_cursor.cc", |
| "rw_proto_cursor.h", |
| "scalar.h", |
| "slab_allocator.h", |
| "vm.cc", |
| "vm.h", |
| ] |
| deps = [ |
| "../../gn:default_deps", |
| "../../protos/perfetto/protovm:zero", |
| "../base", |
| "../protozero", |
| ] |
| } |
| |
| perfetto_proto_library("test_messages_@TYPE@") { |
| sources = [ "test/protos/incremental_trace.proto" ] |
| proto_path = perfetto_root_path |
| } |
| |
| perfetto_unittest_source_set("unittests") { |
| testonly = true |
| deps = [ |
| ":protovm", |
| ":test_messages_lite", |
| "../../gn:default_deps", |
| "../../gn:gtest_and_gmock", |
| "../../protos/perfetto/protovm:lite", |
| "../../protos/perfetto/protovm:zero", |
| "../base", |
| "../base:test_support", |
| "../protozero", |
| ] |
| sources = [ |
| "test/allocator_unittest.cc", |
| "test/mock_executor.h", |
| "test/parser_unittest.cc", |
| "test/ro_cursor_unittest.cc", |
| "test/rw_proto_unittest.cc", |
| "test/sample_packets.h", |
| "test/sample_programs.h", |
| "test/slab_allocator_unittest.cc", |
| "test/utils.cc", |
| "test/utils.h", |
| "test/vm_unittest.cc", |
| ] |
| } |