From 62027b7e14624283f758a7785a0a1347eda0a147 Mon Sep 17 00:00:00 2001 From: Vishal Powar Date: Fri, 30 Nov 2018 14:27:52 -0800 Subject: Changes add a script for generating C code and build rule for protobuf protos All these changes need to go together to make sense - changes to use new version of upb in bazel - allowing includes in build target option - script for generating c code for protos - generated code for example build - adding changes for non-bazel builds - change sanity tests to ignore the generated files. --- tools/run_tests/generated/sources_and_headers.json | 21 +++++++++++++++++++++ tools/run_tests/sanity/check_port_platform.py | 3 +++ 2 files changed, 24 insertions(+) (limited to 'tools/run_tests') diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index d4d5d14f07..2fea807bbb 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -8825,6 +8825,27 @@ "third_party": false, "type": "lib" }, + { + "deps": [], + "headers": [ + "third_party/upb/google/protobuf/descriptor.upb.h", + "third_party/upb/upb/decode.h", + "third_party/upb/upb/def.h", + "third_party/upb/upb/encode.h", + "third_party/upb/upb/handlers.h", + "third_party/upb/upb/msg.h", + "third_party/upb/upb/msgfactory.h", + "third_party/upb/upb/refcounted.h", + "third_party/upb/upb/sink.h", + "third_party/upb/upb/upb.h" + ], + "is_filegroup": false, + "language": "c", + "name": "upb", + "src": [], + "third_party": false, + "type": "lib" + }, { "deps": [], "headers": [ diff --git a/tools/run_tests/sanity/check_port_platform.py b/tools/run_tests/sanity/check_port_platform.py index fff828eaee..8c412700e4 100755 --- a/tools/run_tests/sanity/check_port_platform.py +++ b/tools/run_tests/sanity/check_port_platform.py @@ -35,6 +35,9 @@ def check_port_platform_inclusion(directory_root): continue if filename.endswith('.pb.h') or filename.endswith('.pb.c'): continue + # Skip check for upb generated code + if filename.endswith('.upb.h') or filename.endswith('.upb.c'): + continue with open(path) as f: all_lines_in_file = f.readlines() for index, l in enumerate(all_lines_in_file): -- cgit v1.2.3