Repository: kythe/kythe
Pull request #5342 (2022-08-09 22:26:01)

chore(java): convert old test cases from kindex to kzip


Patch:
diff --git a/kythe/java/com/google/devtools/kythe/analyzers/base/BUILD b/kythe/java/com/google/devtools/kythe/analyzers/base/BUILD
index 1e06a9c67..9a9ebf26a 100644
--- a/kythe/java/com/google/devtools/kythe/analyzers/base/BUILD
+++ b/kythe/java/com/google/devtools/kythe/analyzers/base/BUILD
@@ -73,7 +73,7 @@ java_library(
     ],
 )
 
-# //kythe/javatests/com/google/devtools/kythe/analyzers/java/testdata:corner_case.kindex is derived
+# //kythe/javatests/com/google/devtools/kythe/analyzers/java/testdata:corner_case.kzip is derived
 # based on the sources in //kythe/java/com/google/devtools/kythe/analyzers/java:analyzer which
 # depend on this class.
 filegroup(


Test patch:
diff --git a/kythe/javatests/com/google/devtools/kythe/analyzers/java/BUILD b/kythe/javatests/com/google/devtools/kythe/analyzers/java/BUILD
index 45b9d8719..dc486bd06 100644
--- a/kythe/javatests/com/google/devtools/kythe/analyzers/java/BUILD
+++ b/kythe/javatests/com/google/devtools/kythe/analyzers/java/BUILD
@@ -13,7 +13,7 @@ shell_tool_test(
 
 shell_tool_test(
     name = "indexer_empty_cu_test",
-    data = ["//kythe/testdata:java_empty.kindex"],
+    data = ["//kythe/testdata:java_empty.kzip"],
     scriptfile = "indexer_empty_cu_test.sh",
     tools = {
         "entrystream": "//kythe/go/platform/tools/entrystream",
@@ -25,11 +25,11 @@ shell_tool_test(
 shell_tool_test(
     name = "indexer_source_root_test",
     data = [
-        "//kythe/javatests/com/google/devtools/kythe/analyzers/java/testdata:corner_case.kindex",
+        "//kythe/javatests/com/google/devtools/kythe/analyzers/java/testdata:corner_case.kzip",
         # Having the following sources in the Java indexer's source path caused #818.  The
-        # indexer read the .java file instead of the .class file found in corner_case.kindex,
+        # indexer read the .java file instead of the .class file found in corner_case.kzip,
         # causing javac to compile these sources without their depedencies (the transitive
-        # dependencies of corner_case.kindex's compilation).
+        # dependencies of corner_case.kzip's compilation).
         "//kythe/java/com/google/devtools/kythe/analyzers/base:corner_case_srcs",
     ],
     scriptfile = "indexer_source_root_test.sh",
diff --git a/kythe/javatests/com/google/devtools/kythe/analyzers/java/indexer_empty_cu_test.sh b/kythe/javatests/com/google/devtools/kythe/analyzers/java/indexer_empty_cu_test.sh
index 73418d872..b5a798133 100755
--- a/kythe/javatests/com/google/devtools/kythe/analyzers/java/indexer_empty_cu_test.sh
+++ b/kythe/javatests/com/google/devtools/kythe/analyzers/java/indexer_empty_cu_test.sh
@@ -18,7 +18,7 @@ set -eo pipefail
 
 : "${indexer?:missing indexer}"
 : "${entrystream?:missing entrystream}"
-test_kindex="$PWD/kythe/testdata/java_empty.kindex"
+test_kzip="$PWD/kythe/testdata/java_empty.kzip"
 
-# Test indexing a .kindex file
-"$indexer" "$test_kindex" | "$entrystream" >/dev/null
+# Test indexing a .kzip file
+"$indexer" "$test_kzip" | "$entrystream" >/dev/null
diff --git a/kythe/javatests/com/google/devtools/kythe/analyzers/java/indexer_source_root_test.sh b/kythe/javatests/com/google/devtools/kythe/analyzers/java/indexer_source_root_test.sh
index 04db707c0..633f9a1c6 100755
--- a/kythe/javatests/com/google/devtools/kythe/analyzers/java/indexer_source_root_test.sh
+++ b/kythe/javatests/com/google/devtools/kythe/analyzers/java/indexer_source_root_test.sh
@@ -18,17 +18,17 @@ set -eo pipefail
 
 : "${indexer?:missing indexer}"
 : "${entrystream?:missing entrystream}"
-test_kindex="$PWD/kythe/javatests/com/google/devtools/kythe/analyzers/java/testdata/corner_case.kindex"
+test_kzip="$PWD/kythe/javatests/com/google/devtools/kythe/analyzers/java/testdata/corner_case.kzip"
 
 # This line removes the precondition for #818 (allowing the test to pass).
 # find -L -name KytheEntrySets.java -delete
 
 # This will emit an error if https://kythe.io/phabricator/T70 is not solved.
-"$indexer" "$test_kindex" 2>"$TEST_TMPDIR/err.log" | \
+"$indexer" "$test_kzip" 2>"$TEST_TMPDIR/err.log" | \
   echo "INFO: entrystream read $("$entrystream" --count) entries"
 
 if grep -qE 'Exception|error|KytheEntrySets not seen during extraction' "$TEST_TMPDIR/err.log"; then
-  echo "ERROR while indexing $test_kindex" >&2
+  echo "ERROR while indexing $test_kzip" >&2
   cat "$TEST_TMPDIR/err.log" >&2
   exit 1
 fi
diff --git a/kythe/javatests/com/google/devtools/kythe/analyzers/java/testdata/BUILD b/kythe/javatests/com/google/devtools/kythe/analyzers/java/testdata/BUILD
index 496cc80f4..56dc38b78 100644
--- a/kythe/javatests/com/google/devtools/kythe/analyzers/java/testdata/BUILD
+++ b/kythe/javatests/com/google/devtools/kythe/analyzers/java/testdata/BUILD
@@ -3,7 +3,7 @@ load("//tools/build_rules/verifier_test:java_verifier_test.bzl", "java_verifier_
 load("//kythe/java/com/google/devtools/kythe/extractors/java/bazel:aspect.bzl", "extract_java")
 
 exports_files(
-    ["corner_case.kindex"],
+    ["corner_case.kzip"],
     visibility = ["//kythe/javatests/com/google/devtools/kythe/analyzers/java:__subpackages__"],
 )