1# Copyright 2019 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://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, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15import("//build_overrides/pigweed.gni") 16 17import("$dir_pw_build/python.gni") 18import("$dir_pw_docgen/docs.gni") 19import("$dir_pw_protobuf_compiler/proto.gni") 20import("$dir_pw_third_party/nanopb/nanopb.gni") 21import("$dir_pw_unit_test/test.gni") 22 23pw_doc_group("docs") { 24 sources = [ "docs.rst" ] 25} 26 27pw_test_group("tests") { 28 tests = [ 29 ":nanopb_test", 30 ":pwpb_test", 31 ":nested_packages_test", 32 ] 33} 34 35pw_test("nanopb_test") { 36 deps = [ ":nanopb_test_protos.nanopb" ] 37 sources = [ "nanopb_test.cc" ] 38 enable_if = dir_pw_third_party_nanopb != "" 39} 40 41pw_proto_library("nanopb_test_protos") { 42 sources = [ "pw_protobuf_compiler_nanopb_protos/nanopb_test.proto" ] 43 44 if (dir_pw_third_party_nanopb != "") { 45 deps = [ "$dir_pw_third_party/nanopb:proto" ] 46 } 47} 48 49pw_test("pwpb_test") { 50 deps = [ ":pwpb_test_protos.pwpb" ] 51 sources = [ "pwpb_test.cc" ] 52} 53 54pw_proto_library("pwpb_test_protos") { 55 sources = [ "pw_protobuf_compiler_pwpb_protos/pwpb_test.proto" ] 56 inputs = [ "pw_protobuf_compiler_pwpb_protos/pwpb_test.options" ] 57 deps = [ "$dir_pw_protobuf:common_protos" ] 58} 59 60pw_proto_library("test_protos") { 61 sources = [ 62 "pw_protobuf_compiler_protos/nested/more_nesting/test.proto", 63 "pw_protobuf_compiler_protos/test.proto", 64 ] 65} 66 67pw_test("nested_packages_test") { 68 deps = [ "pw_nested_packages:aggregate_wrapper.pwpb" ] 69 sources = [ "nested_packages_test.cc" ] 70} 71