1################################################################################ 2# Protocol Buffers: C++ Runtime 3################################################################################ 4 5# Most rules are under google/protobuf. This package exists for convenience. 6load("@rules_pkg//pkg:mappings.bzl", "pkg_filegroup", "pkg_files", "strip_prefix") 7load("//conformance:defs.bzl", "conformance_test") 8load("//upb/cmake:build_defs.bzl", "staleness_test") 9 10pkg_files( 11 name = "dist_files", 12 srcs = glob(["**"]), 13 strip_prefix = strip_prefix.from_root(""), 14 visibility = ["//src:__pkg__"], 15) 16 17pkg_filegroup( 18 name = "all_dist_files", 19 srcs = [ 20 ":dist_files", 21 "//src/google/protobuf:dist_files", 22 "//src/google/protobuf/compiler:dist_files", 23 "//src/google/protobuf/compiler/cpp:dist_files", 24 "//src/google/protobuf/compiler/csharp:dist_files", 25 "//src/google/protobuf/compiler/java:dist_files", 26 "//src/google/protobuf/compiler/objectivec:dist_files", 27 "//src/google/protobuf/compiler/php:dist_files", 28 "//src/google/protobuf/compiler/python:dist_files", 29 "//src/google/protobuf/compiler/ruby:dist_files", 30 "//src/google/protobuf/io:dist_files", 31 "//src/google/protobuf/stubs:dist_files", 32 "//src/google/protobuf/testing:dist_files", 33 "//src/google/protobuf/util:dist_files", 34 ], 35 visibility = ["//pkg:__pkg__"], 36) 37 38conformance_test( 39 name = "conformance_test", 40 failure_list = "//conformance:failure_list_cpp.txt", 41 maximum_edition = "2023", 42 testee = "//conformance:conformance_cpp", 43 text_format_failure_list = "//conformance:text_format_failure_list_cpp.txt", 44) 45 46# Copy the generated file_lists.cmake into a place where the staleness test 47# below can use it. 48genrule( 49 name = "copy_cmake_lists", 50 srcs = ["//pkg:gen_src_file_lists"], 51 outs = ["cmake_copy/file_lists.cmake"], 52 cmd = "cp $< $@", 53 tags = ["manual"], 54 visibility = ["//visibility:private"], 55) 56 57staleness_test( 58 name = "cmake_lists_staleness_test", 59 outs = ["file_lists.cmake"], 60 generated_pattern = "cmake_copy/%s", 61 # Only run this test if it is explicitly specified on the command line (not 62 # via //src:all or ...). This file will be automatically updated in a 63 # GitHub action, so developers should not worry about failures from this 64 # test. 65 tags = ["manual"], 66) 67 68test_suite( 69 name = "editions_tests", 70 tests = ["//editions:all_tests"], 71) 72