Enabled TAP testing for upb on Windows via Lexan.

We disable targets that are not currently working on Windows.

PiperOrigin-RevId: 488560033
pull/13171/head
Joshua Haberman 2 years ago committed by Copybara-Service
parent b3cb3fbea8
commit 023c4da591
  1. 17
      BUILD
  2. 4
      python/BUILD
  3. 4
      python/pb_unit_tests/pyproto_test_wrapper.bzl
  4. 3
      python/py_extension.bzl
  5. 7
      upb/hash/test.cc
  6. 5
      upb/util/BUILD
  7. 4
      upbc/BUILD

17
BUILD

@ -614,6 +614,11 @@ cc_test(
"upb/reflection/def_builder_test.cc",
"upb/reflection/def_type.h",
],
# TODO(b/259158612): fix this test on Windows.
target_compatible_with = select({
"@platforms//os:windows": ["//third_party/bazel_platforms:incompatible"],
"//conditions:default": [],
}),
deps = [
":descriptor_upb_proto",
":hash",
@ -887,6 +892,10 @@ cc_binary(
srcs = ["upb/conformance_upb.c"],
copts = UPB_DEFAULT_COPTS,
data = ["upb/conformance_upb_failures.txt"],
target_compatible_with = select({
"@platforms//os:windows": ["//third_party/bazel_platforms:incompatible"],
"//conditions:default": [],
}),
deps = [
":conformance_proto_upb",
":conformance_proto_upbdefs",
@ -917,6 +926,10 @@ sh_test(
":conformance_upb",
"@com_google_protobuf//conformance:conformance_test_runner",
],
target_compatible_with = select({
"@platforms//os:windows": ["//third_party/bazel_platforms:incompatible"],
"//conditions:default": [],
}),
deps = ["@bazel_tools//tools/bash/runfiles"],
)
@ -928,6 +941,10 @@ cc_binary(
"-DREBUILD_MINITABLES",
],
data = ["upb/conformance_upb_failures.txt"],
target_compatible_with = select({
"@platforms//os:windows": ["//third_party/bazel_platforms:incompatible"],
"//conditions:default": [],
}),
deps = [
":conformance_proto_upb",
":conformance_proto_upbdefs",

@ -202,6 +202,10 @@ py_extension(
# casts between function pointers and object pointers.
"-Wno-pedantic",
],
target_compatible_with = select({
"@platforms//os:windows": ["//third_party/bazel_platforms:incompatible"],
"//conditions:default": [],
}),
deps = [
"//:collections",
"//:descriptor_upb_proto_reflection",

@ -31,6 +31,10 @@ def pyproto_test_wrapper(name, deps = []):
# "//net/proto2/python/internal:" + name + "_for_deps",
# "//net/proto2/python/public:use_upb_protos",
# ],
# target_compatible_with = select({
# "@platforms//os:windows": ["//third_party/bazel_platforms:incompatible"],
# "//conditions:default": [],
# }),
# )
#
# end:google_only

@ -2,7 +2,7 @@
load("@bazel_skylib//lib:selects.bzl", "selects")
def py_extension(name, srcs, copts, deps = []):
def py_extension(name, srcs, copts, deps = [], **kwargs):
"""Creates a C++ library to extend python
Args:
@ -38,6 +38,7 @@ def py_extension(name, srcs, copts, deps = []):
"//python:limited_api_3.10_win64": ["@nuget_python_x86-64_3.10.0//:python_limited_api"],
"//conditions:default": ["@system_python//:python_headers"],
}),
**kwargs
)
EXT_SUFFIX = ".abi3.so"

@ -27,7 +27,6 @@
#include <limits.h>
#include <string.h>
#include <sys/resource.h>
#include <iostream>
#include <map>
@ -357,12 +356,6 @@ class TypedIntTable {
using std::vector;
double get_usertime() {
struct rusage usage;
getrusage(RUSAGE_SELF, &usage);
return usage.ru_utime.tv_sec + (usage.ru_utime.tv_usec / 1000000.0);
}
TEST(Table, StringTable) {
vector<std::string> keys;
keys.push_back("google.protobuf.FileDescriptorSet");

@ -115,6 +115,11 @@ cc_library(
cc_test(
name = "compare_test",
srcs = ["compare_test.cc"],
# TODO(b/259158757): fix this test on Windows.
target_compatible_with = select({
"@platforms//os:windows": ["//third_party/bazel_platforms:incompatible"],
"//conditions:default": [],
}),
deps = [
":compare",
"//:wire_internal",

@ -176,6 +176,10 @@ cc_binary(
"subprocess.h",
],
copts = UPB_DEFAULT_CPPOPTS,
target_compatible_with = select({
"@platforms//os:windows": ["//third_party/bazel_platforms:incompatible"],
"//conditions:default": [],
}),
visibility = ["//visibility:public"],
deps = [
":code_generator_request_upb_proto",

Loading…
Cancel
Save