Remove all autotools usage (#10132)
* Bazelfying conformance tests
Adding infrastructure to "Bazelify" languages other than Java and C++
* Delete benchmarks for languages supported by other repositories
* Bazelfying benchmark tests
* Bazelfying python
Use upb's system python rule instead of branching tensorflow
* Bazelfying Ruby
* Bazelfying C#
* Bazelfying Objective-c
* Bazelfying Kokoro mac builds
* Bazelfying Kokoro linux builds
* Deleting all deprecated files from autotools cleanup
This boils down to Makefile.am and tests.sh and all of their remaining references
* Cleanup after PR reorganizing
- Enable 32 bit tests
- Move conformance tests back
- Use select statements to select alternate runtimes
- Add internal prefixes to proto library macros
* Updating READMEs to use bazel instead of autotools.
* Bazelfying Kokoro release builds
* First round of review fixes
* Second round of review fixes
* Third round of review fixes
* Filtering out conformance tests from Bazel on Windows (b/241484899)
* Add version metadata that was previously scraped from configure.ac
* fixing typo from previous fix
* Adding ruby version tests
* Bumping pinned upb version, and adding tests to python CI
diff --git a/java/internal/BUILD.bazel b/java/internal/BUILD.bazel
index 662dabd..598b8b5 100644
--- a/java/internal/BUILD.bazel
+++ b/java/internal/BUILD.bazel
@@ -6,8 +6,19 @@
name = "dist_files",
srcs = [
"BUILD.bazel",
+ "JavaVersionTest.java",
"testing.bzl",
],
strip_prefix = strip_prefix.from_root(""),
visibility = ["//java:__pkg__"],
)
+
+java_test(
+ name = "java_version",
+ test_class = "JavaVersionTest",
+ srcs = ["JavaVersionTest.java"],
+ deps = [
+ "@maven//:com_google_truth_truth",
+ "@maven//:junit_junit",
+ ],
+)
diff --git a/java/internal/JavaVersionTest.java b/java/internal/JavaVersionTest.java
new file mode 100644
index 0000000..eb004d5
--- /dev/null
+++ b/java/internal/JavaVersionTest.java
@@ -0,0 +1,22 @@
+// 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();
+ }
+}