Convert the Kythe index pack into the new kzip format.
Old format: http://www.kythe.io/docs/kythe-index-pack.html
New format: http://www.kythe.io/docs/kythe-kzip.html
The changes are:
* Unit and data files no longer have the .unit and .data extensions.
* Unit and data files are no longer individually compressed.
* The {"format":"kythe", "content":<compilation-unit>} wrapper message in each
unit file is replaced by {"unit":<compilation-unit>}.
* The archive has the .kzip extension instead of .zip.
* The archive has been renamed to chromium_{platform}.kzip.
Bug: 849994
Change-Id: I398aa9ea0871427d8572917e6d18a1b9c4f4cec9
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Reviewed-on: https://chromium-review.googlesource.com/1088454
Commit-Queue: Joey Scarr <jsca@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
diff --git a/scripts/slave/chromium/package_index.py b/scripts/slave/chromium/package_index.py
index 8cf1150..0eed27f 100755
--- a/scripts/slave/chromium/package_index.py
+++ b/scripts/slave/chromium/package_index.py
@@ -14,7 +14,6 @@
import sys
import tempfile
import time
-import zlib
from common import chromium_utils
from contextlib import closing
@@ -54,10 +53,9 @@
self.filesizes = {}
# Create a temporary data directory. The structure is as follows:
# A root directory (arbitrary name) with two subdirectories. The
- # subdirectory 'files' should contain all source files (compressed with
- # gzip) involved in any compilation unit. The subdirectory 'units'
- # describes the compilation units in JSON format (also compressed with
- # gzip).
+ # subdirectory 'files' should contain all source files involved in any
+ # compilation unit. The subdirectory 'units' describes the compilation units
+ # in JSON format.
self.index_directory = tempfile.mkdtemp()
print 'Storing the index pack files in ' + self.index_directory
# Path for the files directory within the index directory
@@ -74,9 +72,8 @@
def _GenerateDataFiles(self):
"""A function which produces the data files for the index pack.
- Each '*.data' file corresponds to a source file which is needed for at least
- one compilation unit. It contains gzip compressed contents of the source
- file.
+ Each file is a copy of a source file which is needed for at least one
+ compilation unit.
"""
# Keeps track of the '*.filepaths' files already processed.
@@ -119,23 +116,16 @@
content_hash = hashlib.sha256(content).hexdigest()
self.filehashes[fname] = content_hash
self.filesizes[fname] = len(content)
- # Use zlib instead of gzip, because gzip is horribly slow. The
- # configuration is chosen to make it gzip compatible.
- gzip_compress = zlib.compressobj(
- 9, zlib.DEFLATED, zlib.MAX_WBITS | 16)
- compressed_content = gzip_compress.compress(content)
- compressed_content += gzip_compress.flush()
- file_name = os.path.join(self.files_directory,
- content_hash + '.data')
+ file_name = os.path.join(self.files_directory, content_hash)
print ' Including source file %s as %s for compilation' % (
fname, file_name)
with open(file_name, 'wb') as f:
- f.write(compressed_content)
+ f.write(content)
def _GenerateUnitFiles(self):
"""A function which produces the unit files for the index pack.
- A unit file consists of a gzip compressed JSON dump of this format:
+ A unit file consists of a JSON dump of this format:
{
'source_file': [<name of the cc or c file>],
'output_key': <path to the file generated by this compilation unit>,
@@ -276,20 +266,16 @@
print "Unit argument: %s" % unit_dictionary['argument']
wrapper = {
- 'format': 'kythe',
- 'content': unit_dictionary
+ 'unit': unit_dictionary
}
- # Dump the dictionary in JSON format to a gzip compressed file.
+ # Dump the dictionary in JSON format.
unit_file_content = json.dumps(wrapper)
unit_file_content_hash = hashlib.sha256(unit_file_content).hexdigest()
- unit_file_path = os.path.join(
- self.units_directory, unit_file_content_hash + '.unit')
- gzip_compress = zlib.compressobj(9, zlib.DEFLATED, zlib.MAX_WBITS | 16)
- unit_file_compressed = gzip_compress.compress(unit_file_content)
- unit_file_compressed += gzip_compress.flush()
+ unit_file_path = os.path.join(self.units_directory,
+ unit_file_content_hash)
with open(unit_file_path, 'wb') as unit_file:
- unit_file.write(unit_file_compressed)
+ unit_file.write(unit_file_content)
print 'Wrote compilation unit file %s' % unit_file_path
def GenerateIndexPack(self):
@@ -299,11 +285,11 @@
files (describing one compilation unit each).
"""
- # Generate the compressed source files (*.data).
+ # Generate the source files.
# This needs to be called first before calling _GenerateUnitFiles()
self._GenerateDataFiles()
- # Generate the compressed unit files (*.unit).
+ # Generate the unit files.
self._GenerateUnitFiles()
def CreateArchive(self, filepath):
diff --git a/scripts/slave/recipe_modules/codesearch/api.py b/scripts/slave/recipe_modules/codesearch/api.py
index 129ca40..2beee98 100644
--- a/scripts/slave/recipe_modules/codesearch/api.py
+++ b/scripts/slave/recipe_modules/codesearch/api.py
@@ -154,14 +154,14 @@
"""Create the kythe index pack and upload it to google storage.
"""
commit_position = self._get_commit_position()
- index_pack_kythe_name = 'index_pack_%s_kythe.zip' % self.c.PLATFORM
+ index_pack_kythe_name = 'chromium_%s.kzip' % self.c.PLATFORM
# TODO(hinoka): Delete these two lines after migrated to LUCI.
if self.m.runtime.is_experimental:
index_pack_kythe_name_with_revision = (
- 'index_pack_%s_kythe_%s_%s_experimental.zip' % (
+ 'chromium_%s_%s_%s_experimental.kzip' % (
self.c.PLATFORM, commit_position, self._get_revision()))
else:
- index_pack_kythe_name_with_revision = 'index_pack_%s_kythe_%s_%s.zip' % (
+ index_pack_kythe_name_with_revision = 'chromium_%s_%s_%s.kzip' % (
self.c.PLATFORM, commit_position, self._get_revision())
self._create_kythe_index_pack(index_pack_kythe_name)
@@ -192,7 +192,7 @@
def _upload_kythe_index_pack(self, bucket_name, index_pack_kythe_name,
index_pack_kythe_name_with_revision):
- """Upload the kythe index pack to goole storage.
+ """Upload the kythe index pack to google storage.
Args:
bucket_name: Name of the google storage bucket to upload to
diff --git a/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_linux_test_basic.json b/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_linux_test_basic.json
index af22d9f..4fef6e9 100644
--- a/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_linux_test_basic.json
+++ b/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_linux_test_basic.json
@@ -869,7 +869,7 @@
"--path-to-compdb",
"[START_DIR]/src/out/Debug/compile_commands.json",
"--path-to-archive-output",
- "[START_DIR]/src/out/Debug/index_pack_linux_kythe.zip",
+ "[START_DIR]/src/out/Debug/chromium_linux.kzip",
"--corpus",
"chromium-linux",
"--revision",
@@ -886,13 +886,13 @@
"RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
- "[START_DIR]/src/out/Debug/index_pack_linux_kythe.zip",
- "gs://chrome-codesearch/prod/index_pack_linux_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip"
+ "[START_DIR]/src/out/Debug/chromium_linux.kzip",
+ "gs://chrome-codesearch/prod/chromium_linux_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip"
],
"infra_step": true,
"name": "gsutil upload kythe index pack",
"~followup_annotations": [
- "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/index_pack_linux_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip@@@"
+ "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/chromium_linux_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip@@@"
]
},
{
diff --git a/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_linux_test_experimental.json b/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_linux_test_experimental.json
index a27b60d..db4ac47 100644
--- a/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_linux_test_experimental.json
+++ b/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_linux_test_experimental.json
@@ -871,7 +871,7 @@
"--path-to-compdb",
"[START_DIR]/src/out/Debug/compile_commands.json",
"--path-to-archive-output",
- "[START_DIR]/src/out/Debug/index_pack_linux_kythe.zip",
+ "[START_DIR]/src/out/Debug/chromium_linux.kzip",
"--corpus",
"chromium-linux",
"--revision",
@@ -888,13 +888,13 @@
"RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
- "[START_DIR]/src/out/Debug/index_pack_linux_kythe.zip",
- "gs://chrome-codesearch/prod/index_pack_linux_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9_experimental.zip"
+ "[START_DIR]/src/out/Debug/chromium_linux.kzip",
+ "gs://chrome-codesearch/prod/chromium_linux_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9_experimental.kzip"
],
"infra_step": true,
"name": "gsutil upload kythe index pack",
"~followup_annotations": [
- "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/index_pack_linux_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9_experimental.zip@@@"
+ "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/chromium_linux_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9_experimental.kzip@@@"
]
},
{
diff --git a/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_win_delete_generated_files_fail.json b/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_win_delete_generated_files_fail.json
index 95839c0..d29b74f 100644
--- a/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_win_delete_generated_files_fail.json
+++ b/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_win_delete_generated_files_fail.json
@@ -877,7 +877,7 @@
"--path-to-compdb",
"[START_DIR]/src/out/chromium-win/Debug/compile_commands.json",
"--path-to-archive-output",
- "[START_DIR]/src/out/chromium-win/Debug/index_pack_win_kythe.zip",
+ "[START_DIR]/src/out/chromium-win/Debug/chromium_win.kzip",
"--corpus",
"chromium-win",
"--revision",
@@ -896,13 +896,13 @@
"RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
- "[START_DIR]/src/out/chromium-win/Debug/index_pack_win_kythe.zip",
- "gs://chrome-codesearch/prod/index_pack_win_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip"
+ "[START_DIR]/src/out/chromium-win/Debug/chromium_win.kzip",
+ "gs://chrome-codesearch/prod/chromium_win_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip"
],
"infra_step": true,
"name": "gsutil upload kythe index pack",
"~followup_annotations": [
- "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/index_pack_win_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip@@@"
+ "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/chromium_win_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip@@@"
]
},
{
diff --git a/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_win_test_basic.json b/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_win_test_basic.json
index f326524..d49a5ba 100644
--- a/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_win_test_basic.json
+++ b/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_win_test_basic.json
@@ -872,7 +872,7 @@
"--path-to-compdb",
"[START_DIR]/src/out/chromium-win/Debug/compile_commands.json",
"--path-to-archive-output",
- "[START_DIR]/src/out/chromium-win/Debug/index_pack_win_kythe.zip",
+ "[START_DIR]/src/out/chromium-win/Debug/chromium_win.kzip",
"--corpus",
"chromium-win",
"--revision",
@@ -891,13 +891,13 @@
"RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
- "[START_DIR]/src/out/chromium-win/Debug/index_pack_win_kythe.zip",
- "gs://chrome-codesearch/prod/index_pack_win_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip"
+ "[START_DIR]/src/out/chromium-win/Debug/chromium_win.kzip",
+ "gs://chrome-codesearch/prod/chromium_win_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip"
],
"infra_step": true,
"name": "gsutil upload kythe index pack",
"~followup_annotations": [
- "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/index_pack_win_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip@@@"
+ "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/chromium_win_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip@@@"
]
},
{
diff --git a/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_win_test_experimental.json b/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_win_test_experimental.json
index 7c022ce..b80ba73 100644
--- a/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_win_test_experimental.json
+++ b/scripts/slave/recipe_modules/codesearch/examples/full.expected/codesearch_gen_chromium_win_test_experimental.json
@@ -874,7 +874,7 @@
"--path-to-compdb",
"[START_DIR]/src/out/chromium-win/Debug/compile_commands.json",
"--path-to-archive-output",
- "[START_DIR]/src/out/chromium-win/Debug/index_pack_win_kythe.zip",
+ "[START_DIR]/src/out/chromium-win/Debug/chromium_win.kzip",
"--corpus",
"chromium-win",
"--revision",
@@ -893,13 +893,13 @@
"RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
- "[START_DIR]/src/out/chromium-win/Debug/index_pack_win_kythe.zip",
- "gs://chrome-codesearch/prod/index_pack_win_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9_experimental.zip"
+ "[START_DIR]/src/out/chromium-win/Debug/chromium_win.kzip",
+ "gs://chrome-codesearch/prod/chromium_win_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9_experimental.kzip"
],
"infra_step": true,
"name": "gsutil upload kythe index pack",
"~followup_annotations": [
- "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/index_pack_win_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9_experimental.zip@@@"
+ "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/chromium_win_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9_experimental.kzip@@@"
]
},
{
diff --git a/scripts/slave/recipe_modules/codesearch/tests/create_and_upload_kythe_index_pack.expected/basic.json b/scripts/slave/recipe_modules/codesearch/tests/create_and_upload_kythe_index_pack.expected/basic.json
index 0a346a7..90d83cb 100644
--- a/scripts/slave/recipe_modules/codesearch/tests/create_and_upload_kythe_index_pack.expected/basic.json
+++ b/scripts/slave/recipe_modules/codesearch/tests/create_and_upload_kythe_index_pack.expected/basic.json
@@ -161,7 +161,7 @@
"--path-to-compdb",
"[START_DIR]/src/out/Debug/compile_commands.json",
"--path-to-archive-output",
- "[START_DIR]/src/out/Debug/index_pack_linux_kythe.zip",
+ "[START_DIR]/src/out/Debug/chromium_linux.kzip",
"--corpus",
"chromium",
"--revision",
@@ -180,13 +180,13 @@
"RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
- "[START_DIR]/src/out/Debug/index_pack_linux_kythe.zip",
- "gs://chrome-codesearch/prod/index_pack_linux_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip"
+ "[START_DIR]/src/out/Debug/chromium_linux.kzip",
+ "gs://chrome-codesearch/prod/chromium_linux_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip"
],
"infra_step": true,
"name": "gsutil upload kythe index pack",
"~followup_annotations": [
- "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/index_pack_linux_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip@@@"
+ "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/chromium_linux_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip@@@"
]
},
{
diff --git a/scripts/slave/recipe_modules/codesearch/tests/create_and_upload_kythe_index_pack.expected/basic_without_got_revision_cp.json b/scripts/slave/recipe_modules/codesearch/tests/create_and_upload_kythe_index_pack.expected/basic_without_got_revision_cp.json
index 66c7ecf..4925267 100644
--- a/scripts/slave/recipe_modules/codesearch/tests/create_and_upload_kythe_index_pack.expected/basic_without_got_revision_cp.json
+++ b/scripts/slave/recipe_modules/codesearch/tests/create_and_upload_kythe_index_pack.expected/basic_without_got_revision_cp.json
@@ -161,7 +161,7 @@
"--path-to-compdb",
"[START_DIR]/src/out/Debug/compile_commands.json",
"--path-to-archive-output",
- "[START_DIR]/src/out/Debug/index_pack_linux_kythe.zip",
+ "[START_DIR]/src/out/Debug/chromium_linux.kzip",
"--corpus",
"chromium",
"--revision",
@@ -180,13 +180,13 @@
"RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
- "[START_DIR]/src/out/Debug/index_pack_linux_kythe.zip",
- "gs://chrome-codesearch/prod/index_pack_linux_kythe_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip"
+ "[START_DIR]/src/out/Debug/chromium_linux.kzip",
+ "gs://chrome-codesearch/prod/chromium_linux_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip"
],
"infra_step": true,
"name": "gsutil upload kythe index pack",
"~followup_annotations": [
- "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/index_pack_linux_kythe_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip@@@"
+ "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/chromium_linux_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip@@@"
]
},
{
diff --git a/scripts/slave/recipe_modules/codesearch/tests/create_and_upload_kythe_index_pack.expected/basic_without_kythe_root.json b/scripts/slave/recipe_modules/codesearch/tests/create_and_upload_kythe_index_pack.expected/basic_without_kythe_root.json
index 20d4c13..a3b3153 100644
--- a/scripts/slave/recipe_modules/codesearch/tests/create_and_upload_kythe_index_pack.expected/basic_without_kythe_root.json
+++ b/scripts/slave/recipe_modules/codesearch/tests/create_and_upload_kythe_index_pack.expected/basic_without_kythe_root.json
@@ -161,7 +161,7 @@
"--path-to-compdb",
"[START_DIR]/src/out/Debug/compile_commands.json",
"--path-to-archive-output",
- "[START_DIR]/src/out/Debug/index_pack_linux_kythe.zip",
+ "[START_DIR]/src/out/Debug/chromium_linux.kzip",
"--corpus",
"chromium",
"--revision",
@@ -178,13 +178,13 @@
"RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
- "[START_DIR]/src/out/Debug/index_pack_linux_kythe.zip",
- "gs://chrome-codesearch/prod/index_pack_linux_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip"
+ "[START_DIR]/src/out/Debug/chromium_linux.kzip",
+ "gs://chrome-codesearch/prod/chromium_linux_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip"
],
"infra_step": true,
"name": "gsutil upload kythe index pack",
"~followup_annotations": [
- "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/index_pack_linux_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip@@@"
+ "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/chromium_linux_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip@@@"
]
},
{
diff --git a/scripts/slave/recipe_modules/codesearch/tests/create_and_upload_kythe_index_pack.expected/bucket_name_not_set_failed.json b/scripts/slave/recipe_modules/codesearch/tests/create_and_upload_kythe_index_pack.expected/bucket_name_not_set_failed.json
index 8b4d8a5..390306e 100644
--- a/scripts/slave/recipe_modules/codesearch/tests/create_and_upload_kythe_index_pack.expected/bucket_name_not_set_failed.json
+++ b/scripts/slave/recipe_modules/codesearch/tests/create_and_upload_kythe_index_pack.expected/bucket_name_not_set_failed.json
@@ -161,7 +161,7 @@
"--path-to-compdb",
"[START_DIR]/src/out/Debug/compile_commands.json",
"--path-to-archive-output",
- "[START_DIR]/src/out/Debug/index_pack_linux_kythe.zip",
+ "[START_DIR]/src/out/Debug/chromium_linux.kzip",
"--corpus",
"chromium",
"--revision",
diff --git a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_android.json b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_android.json
index 9e1ebb2..f38be92 100644
--- a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_android.json
+++ b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_android.json
@@ -867,7 +867,7 @@
"--path-to-compdb",
"[START_DIR]/src/out/chromium-android/Debug/compile_commands.json",
"--path-to-archive-output",
- "[START_DIR]/src/out/chromium-android/Debug/index_pack_android_kythe.zip",
+ "[START_DIR]/src/out/chromium-android/Debug/chromium_android.kzip",
"--corpus",
"chromium",
"--revision",
@@ -888,13 +888,13 @@
"RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
- "[START_DIR]/src/out/chromium-android/Debug/index_pack_android_kythe.zip",
- "gs://chrome-codesearch/prod/index_pack_android_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip"
+ "[START_DIR]/src/out/chromium-android/Debug/chromium_android.kzip",
+ "gs://chrome-codesearch/prod/chromium_android_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip"
],
"infra_step": true,
"name": "gsutil upload kythe index pack",
"~followup_annotations": [
- "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/index_pack_android_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip@@@"
+ "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/chromium_android_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip@@@"
]
},
{
diff --git a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_android_with_revision.json b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_android_with_revision.json
index 64d995f..78b4dfd 100644
--- a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_android_with_revision.json
+++ b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_android_with_revision.json
@@ -867,7 +867,7 @@
"--path-to-compdb",
"[START_DIR]/src/out/chromium-android/Debug/compile_commands.json",
"--path-to-archive-output",
- "[START_DIR]/src/out/chromium-android/Debug/index_pack_android_kythe.zip",
+ "[START_DIR]/src/out/chromium-android/Debug/chromium_android.kzip",
"--corpus",
"chromium",
"--revision",
@@ -888,13 +888,13 @@
"RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
- "[START_DIR]/src/out/chromium-android/Debug/index_pack_android_kythe.zip",
- "gs://chrome-codesearch/prod/index_pack_android_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip"
+ "[START_DIR]/src/out/chromium-android/Debug/chromium_android.kzip",
+ "gs://chrome-codesearch/prod/chromium_android_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip"
],
"infra_step": true,
"name": "gsutil upload kythe index pack",
"~followup_annotations": [
- "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/index_pack_android_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip@@@"
+ "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/chromium_android_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip@@@"
]
},
{
diff --git a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_chromiumos.json b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_chromiumos.json
index 450d17f..425bda3 100644
--- a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_chromiumos.json
+++ b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_chromiumos.json
@@ -1295,7 +1295,7 @@
"--path-to-compdb",
"[START_DIR]/src/out/Debug/compile_commands.json",
"--path-to-archive-output",
- "[START_DIR]/src/out/Debug/index_pack_chromeos_kythe.zip",
+ "[START_DIR]/src/out/Debug/chromium_chromeos.kzip",
"--corpus",
"chromium",
"--revision",
@@ -1312,13 +1312,13 @@
"RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
- "[START_DIR]/src/out/Debug/index_pack_chromeos_kythe.zip",
- "gs://chrome-codesearch/prod/index_pack_chromeos_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip"
+ "[START_DIR]/src/out/Debug/chromium_chromeos.kzip",
+ "gs://chrome-codesearch/prod/chromium_chromeos_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip"
],
"infra_step": true,
"name": "gsutil upload kythe index pack",
"~followup_annotations": [
- "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/index_pack_chromeos_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip@@@"
+ "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/chromium_chromeos_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip@@@"
]
},
{
diff --git a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_chromiumos_translation_unit_fail.json b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_chromiumos_translation_unit_fail.json
index d6e8f3d..0dd2e9e 100644
--- a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_chromiumos_translation_unit_fail.json
+++ b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_chromiumos_translation_unit_fail.json
@@ -1300,7 +1300,7 @@
"--path-to-compdb",
"[START_DIR]/src/out/Debug/compile_commands.json",
"--path-to-archive-output",
- "[START_DIR]/src/out/Debug/index_pack_chromeos_kythe.zip",
+ "[START_DIR]/src/out/Debug/chromium_chromeos.kzip",
"--corpus",
"chromium",
"--revision",
@@ -1317,13 +1317,13 @@
"RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
- "[START_DIR]/src/out/Debug/index_pack_chromeos_kythe.zip",
- "gs://chrome-codesearch/prod/index_pack_chromeos_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip"
+ "[START_DIR]/src/out/Debug/chromium_chromeos.kzip",
+ "gs://chrome-codesearch/prod/chromium_chromeos_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip"
],
"infra_step": true,
"name": "gsutil upload kythe index pack",
"~followup_annotations": [
- "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/index_pack_chromeos_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip@@@"
+ "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/chromium_chromeos_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip@@@"
]
},
{
diff --git a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_chromiumos_with_revision.json b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_chromiumos_with_revision.json
index b4489ef..8def43f 100644
--- a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_chromiumos_with_revision.json
+++ b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_chromiumos_with_revision.json
@@ -1295,7 +1295,7 @@
"--path-to-compdb",
"[START_DIR]/src/out/Debug/compile_commands.json",
"--path-to-archive-output",
- "[START_DIR]/src/out/Debug/index_pack_chromeos_kythe.zip",
+ "[START_DIR]/src/out/Debug/chromium_chromeos.kzip",
"--corpus",
"chromium",
"--revision",
@@ -1312,13 +1312,13 @@
"RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
- "[START_DIR]/src/out/Debug/index_pack_chromeos_kythe.zip",
- "gs://chrome-codesearch/prod/index_pack_chromeos_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip"
+ "[START_DIR]/src/out/Debug/chromium_chromeos.kzip",
+ "gs://chrome-codesearch/prod/chromium_chromeos_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip"
],
"infra_step": true,
"name": "gsutil upload kythe index pack",
"~followup_annotations": [
- "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/index_pack_chromeos_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip@@@"
+ "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/chromium_chromeos_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip@@@"
]
},
{
diff --git a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_linux.json b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_linux.json
index c39d58b..8d9e677 100644
--- a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_linux.json
+++ b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_linux.json
@@ -867,7 +867,7 @@
"--path-to-compdb",
"[START_DIR]/src/out/Debug/compile_commands.json",
"--path-to-archive-output",
- "[START_DIR]/src/out/Debug/index_pack_linux_kythe.zip",
+ "[START_DIR]/src/out/Debug/chromium_linux.kzip",
"--corpus",
"chromium",
"--revision",
@@ -884,13 +884,13 @@
"RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
- "[START_DIR]/src/out/Debug/index_pack_linux_kythe.zip",
- "gs://chrome-codesearch/prod/index_pack_linux_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip"
+ "[START_DIR]/src/out/Debug/chromium_linux.kzip",
+ "gs://chrome-codesearch/prod/chromium_linux_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip"
],
"infra_step": true,
"name": "gsutil upload kythe index pack",
"~followup_annotations": [
- "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/index_pack_linux_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip@@@"
+ "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/chromium_linux_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip@@@"
]
},
{
diff --git a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_linux_with_revision.json b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_linux_with_revision.json
index c5007f4..4af0a39 100644
--- a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_linux_with_revision.json
+++ b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_linux_with_revision.json
@@ -867,7 +867,7 @@
"--path-to-compdb",
"[START_DIR]/src/out/Debug/compile_commands.json",
"--path-to-archive-output",
- "[START_DIR]/src/out/Debug/index_pack_linux_kythe.zip",
+ "[START_DIR]/src/out/Debug/chromium_linux.kzip",
"--corpus",
"chromium",
"--revision",
@@ -884,13 +884,13 @@
"RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
- "[START_DIR]/src/out/Debug/index_pack_linux_kythe.zip",
- "gs://chrome-codesearch/prod/index_pack_linux_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip"
+ "[START_DIR]/src/out/Debug/chromium_linux.kzip",
+ "gs://chrome-codesearch/prod/chromium_linux_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip"
],
"infra_step": true,
"name": "gsutil upload kythe index pack",
"~followup_annotations": [
- "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/index_pack_linux_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip@@@"
+ "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/chromium_linux_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip@@@"
]
},
{
diff --git a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_win.json b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_win.json
index 5a9eeb8..543abf4 100644
--- a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_win.json
+++ b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_win.json
@@ -870,7 +870,7 @@
"--path-to-compdb",
"[START_DIR]/src/out/Debug/compile_commands.json",
"--path-to-archive-output",
- "[START_DIR]/src/out/Debug/index_pack_win_kythe.zip",
+ "[START_DIR]/src/out/Debug/chromium_win.kzip",
"--corpus",
"chromium",
"--revision",
@@ -889,13 +889,13 @@
"RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
- "[START_DIR]/src/out/Debug/index_pack_win_kythe.zip",
- "gs://chrome-codesearch/prod/index_pack_win_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip"
+ "[START_DIR]/src/out/Debug/chromium_win.kzip",
+ "gs://chrome-codesearch/prod/chromium_win_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip"
],
"infra_step": true,
"name": "gsutil upload kythe index pack",
"~followup_annotations": [
- "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/index_pack_win_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip@@@"
+ "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/chromium_win_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip@@@"
]
},
{
diff --git a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_win_delete_generated_files_fail.json b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_win_delete_generated_files_fail.json
index 1d70c4d..93400c7 100644
--- a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_win_delete_generated_files_fail.json
+++ b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_win_delete_generated_files_fail.json
@@ -875,7 +875,7 @@
"--path-to-compdb",
"[START_DIR]/src/out/Debug/compile_commands.json",
"--path-to-archive-output",
- "[START_DIR]/src/out/Debug/index_pack_win_kythe.zip",
+ "[START_DIR]/src/out/Debug/chromium_win.kzip",
"--corpus",
"chromium",
"--revision",
@@ -894,13 +894,13 @@
"RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
- "[START_DIR]/src/out/Debug/index_pack_win_kythe.zip",
- "gs://chrome-codesearch/prod/index_pack_win_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip"
+ "[START_DIR]/src/out/Debug/chromium_win.kzip",
+ "gs://chrome-codesearch/prod/chromium_win_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip"
],
"infra_step": true,
"name": "gsutil upload kythe index pack",
"~followup_annotations": [
- "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/index_pack_win_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip@@@"
+ "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/chromium_win_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip@@@"
]
},
{
diff --git a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_win_with_revision.json b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_win_with_revision.json
index 0f2837f..c0a1390 100644
--- a/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_win_with_revision.json
+++ b/scripts/slave/recipes/chromium_codesearch.expected/full_codesearch_gen_chromium_win_with_revision.json
@@ -870,7 +870,7 @@
"--path-to-compdb",
"[START_DIR]/src/out/Debug/compile_commands.json",
"--path-to-archive-output",
- "[START_DIR]/src/out/Debug/index_pack_win_kythe.zip",
+ "[START_DIR]/src/out/Debug/chromium_win.kzip",
"--corpus",
"chromium",
"--revision",
@@ -889,13 +889,13 @@
"RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
- "[START_DIR]/src/out/Debug/index_pack_win_kythe.zip",
- "gs://chrome-codesearch/prod/index_pack_win_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip"
+ "[START_DIR]/src/out/Debug/chromium_win.kzip",
+ "gs://chrome-codesearch/prod/chromium_win_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip"
],
"infra_step": true,
"name": "gsutil upload kythe index pack",
"~followup_annotations": [
- "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/index_pack_win_kythe_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.zip@@@"
+ "@@@STEP_LINK@gsutil.upload@https://storage.cloud.google.com/chrome-codesearch/prod/chromium_win_170242_f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9.kzip@@@"
]
},
{
diff --git a/scripts/slave/unittests/package_index_test.py b/scripts/slave/unittests/package_index_test.py
index ed5bec4..d279295 100755
--- a/scripts/slave/unittests/package_index_test.py
+++ b/scripts/slave/unittests/package_index_test.py
@@ -6,7 +6,6 @@
"""Tests for package_index.py."""
-import gzip
import hashlib
import json
import os
@@ -78,7 +77,7 @@
# Create a path for the archive to be written to.
with tempfile.NamedTemporaryFile(
- suffix='.zip', delete=False) as archive_file:
+ suffix='.kzip', delete=False) as archive_file:
self.archive_path = archive_file.name
self.index_pack = package_index.IndexPack(
@@ -101,14 +100,14 @@
def _CheckDataFile(self, filename, content):
filepath = os.path.join(self.index_pack.index_directory, 'files', filename)
self.assertTrue(os.path.exists(filepath))
- with gzip.open(filepath, 'rb') as data_file:
+ with open(filepath, 'r') as data_file:
actual_content = data_file.read()
self.assertEquals(content, actual_content)
def testGenerateDataFiles(self):
self.index_pack._GenerateDataFiles()
- test_cc_file = hashlib.sha256(TEST_CC_FILE_CONTENT).hexdigest() + '.data'
- test_h_file = hashlib.sha256(TEST_H_FILE_CONTENT).hexdigest() + '.data'
+ test_cc_file = hashlib.sha256(TEST_CC_FILE_CONTENT).hexdigest()
+ test_h_file = hashlib.sha256(TEST_H_FILE_CONTENT).hexdigest()
self._CheckDataFile(test_cc_file, TEST_CC_FILE_CONTENT)
self._CheckDataFile(test_h_file, TEST_H_FILE_CONTENT)
@@ -138,18 +137,16 @@
unit_files = os.listdir(units_dir)
self.assertEqual(1, len(unit_files))
for unit_file_name in unit_files:
- with gzip.open(
- os.path.join(units_dir, unit_file_name), 'rb') as unit_file:
+ with open(os.path.join(units_dir, unit_file_name), 'r') as unit_file:
unit_file_content = unit_file.read()
# Assert that the name of the unit file is correct.
unit_file_hash = hashlib.sha256(unit_file_content).hexdigest()
- self.assertEquals(unit_file_name, unit_file_hash + '.unit')
+ self.assertEquals(unit_file_name, unit_file_hash)
# Assert that the json content encodes valid dictionaries.
compilation_unit_wrapper = json.loads(unit_file_content)
- self.assertEquals(compilation_unit_wrapper['format'], 'kythe')
- compilation_unit_dictionary = compilation_unit_wrapper['content']
+ compilation_unit_dictionary = compilation_unit_wrapper['unit']
self.assertEquals(compilation_unit_dictionary['v_name']['corpus'],
CORPUS)
@@ -234,13 +231,12 @@
unit_files = os.listdir(units_dir)
self.assertEqual(1, len(unit_files))
for unit_file_name in unit_files:
- with gzip.open(
- os.path.join(units_dir, unit_file_name), 'rb') as unit_file:
+ with open(os.path.join(units_dir, unit_file_name), 'r') as unit_file:
unit_file_content = unit_file.read()
# Assert that the output path was parsed correctly.
compilation_unit_wrapper = json.loads(unit_file_content)
- compilation_unit_dictionary = compilation_unit_wrapper['content']
+ compilation_unit_dictionary = compilation_unit_wrapper['unit']
self.assertEquals(compilation_unit_dictionary['output_key'], 'test.obj')
def testCreateArchive(self):
@@ -276,13 +272,13 @@
self.assertIn(os.path.join(root, 'files', ''), zipped_filenames)
- test_cc_file = hashlib.sha256(TEST_CC_FILE_CONTENT).hexdigest() + '.data'
+ test_cc_file = hashlib.sha256(TEST_CC_FILE_CONTENT).hexdigest()
self.assertIn(os.path.join(root, 'files', test_cc_file), zipped_filenames)
- test_h_file = hashlib.sha256(TEST_H_FILE_CONTENT).hexdigest() + '.data'
+ test_h_file = hashlib.sha256(TEST_H_FILE_CONTENT).hexdigest()
self.assertIn(os.path.join(root, 'files', test_h_file), zipped_filenames)
- test_h_file2 = hashlib.sha256(TEST2_H_FILE_CONTENT).hexdigest() + '.data'
+ test_h_file2 = hashlib.sha256(TEST2_H_FILE_CONTENT).hexdigest()
self.assertIn(os.path.join(root, 'files', test_h_file2), zipped_filenames)
if __name__ == '__main__':