blob: b767a9a640e495d1b88adb421eee0e6ec4ddc4c2 [file] [log] [blame]
# Copyright (C) 2017 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.gni")
import("../../gn/proto_library.gni")
import("../../gn/test.gni")
source_set("protozero") {
public_configs = [ "../../gn:default_config" ]
public_deps = [
"../../include/perfetto/protozero",
]
deps = [
"../../gn:default_deps",
"../../include/perfetto/base",
"../../include/perfetto/ext/base", # TODO(primiano): remove this
]
sources = [
"message.cc",
"message_handle.cc",
"proto_decoder.cc",
"scattered_heap_buffer.cc",
"scattered_stream_null_delegate.cc",
"scattered_stream_writer.cc",
]
}
static_library("libprotozero") {
complete_static_lib = true
deps = [
":protozero",
]
}
perfetto_unittest_source_set("unittests") {
testonly = true
deps = [
":protozero",
":testing_messages_lite",
":testing_messages_zero",
"../../gn:default_deps",
"../../gn:gtest_and_gmock",
"../base",
"../base:test_support",
]
sources = [
"message_handle_unittest.cc",
"message_unittest.cc",
"proto_decoder_unittest.cc",
"proto_utils_unittest.cc",
"scattered_stream_writer_unittest.cc",
"test/fake_scattered_buffer.cc",
"test/fake_scattered_buffer.h",
"test/protozero_conformance_unittest.cc",
]
}
# Generates both xxx.pbzero.h and xxx.pb.h (official proto).
perfetto_proto_library("testing_messages_@TYPE@") {
sources = [
"test/example_proto/library.proto",
"test/example_proto/library_internals/galaxies.proto",
"test/example_proto/test_messages.proto",
"test/example_proto/upper_import.proto",
]
proto_path = perfetto_root_path
}
perfetto_fuzzer_test("protozero_decoder_fuzzer") {
sources = [
"proto_decoder_fuzzer.cc",
]
deps = [
":protozero",
"../../gn:default_deps",
"../base",
]
}