ADD: added new version of protobuf

This commit is contained in:
Henry Winkel
2022-12-20 10:09:28 +01:00
parent 4a79559129
commit 1e2b3dda7b
1513 changed files with 123720 additions and 83381 deletions

View File

@@ -1,24 +1,13 @@
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
package(default_visibility = ["//java:__subpackages__"])
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
pkg_files(
name = "dist_files",
srcs = [
"BUILD.bazel",
"JavaVersionTest.java",
"testing.bzl",
],
strip_prefix = strip_prefix.from_root(""),
visibility = ["//java:__pkg__"],
)
java_test(
name = "java_version",
srcs = ["JavaVersionTest.java"],
test_class = "JavaVersionTest",
deps = [
"@maven//:com_google_truth_truth",
"@maven//:junit_junit",
],
)

View File

@@ -1,22 +0,0 @@
// Test that Kokoro is using the expected version of Java.
import static com.google.common.truth.Truth.assertWithMessage;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@RunWith(JUnit4.class)
public class JavaVersionTest {
@Test
public void testJavaVersion() throws Exception {
String exp = System.getenv("KOKORO_JAVA_VERSION");
if(exp == null || exp.isEmpty()) {
System.err.println("No kokoro java version found, skipping check");
return;
}
String version = System.getProperty("java.version");
assertWithMessage("Expected Python " + exp + " but found Python " + version)
.that(version.startsWith(exp))
.isTrue();
}
}

View File

@@ -50,7 +50,7 @@ def junit_tests(name, srcs, data = [], deps = [], package_name = "com.google.pro
if not test_name.endswith("Test") or test_name.startswith("Abstract"):
continue
if test_prefix:
test_name = "%s%s" % (test_prefix, test_name)
test_name = "%s%s" % (test_prefix, test_name)
test_names = test_names + [test_name]
suite_name = prefix + '_' + test_name
_gen_suite(