From 573322279a0c8c5771f95508f6fca4dc60cd7786 Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Wed, 15 Aug 2018 16:16:21 -0700 Subject: [PATCH] Use the new executable for mkuserimg_mke2fs This is in line with the change of mkuserimg_mke2fs.sh to python binary. Bug: 112555072 Bug: 63866463 Test: unittests pass Change-Id: I82c0be1e5bbc685edc15120da73aa43fdc9f2f05 --- core/Makefile | 2 +- core/config.mk | 2 +- tools/releasetools/build_image.py | 2 +- tools/releasetools/test_build_image.py | 2 +- tools/releasetools/test_validate_target_files.py | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/Makefile b/core/Makefile index e11dd02c6..f36e2f10e 100644 --- a/core/Makefile +++ b/core/Makefile @@ -2960,7 +2960,7 @@ OTATOOLS := $(HOST_OUT_EXECUTABLES)/minigzip \ $(HOST_OUT_JAVA_LIBRARIES)/BootSignature.jar \ $(HOST_OUT_JAVA_LIBRARIES)/VeritySigner.jar \ $(HOST_OUT_EXECUTABLES)/mke2fs \ - $(HOST_OUT_EXECUTABLES)/mkuserimg_mke2fs.sh \ + $(HOST_OUT_EXECUTABLES)/mkuserimg_mke2fs \ $(HOST_OUT_EXECUTABLES)/e2fsdroid \ $(HOST_OUT_EXECUTABLES)/mksquashfsimage.sh \ $(HOST_OUT_EXECUTABLES)/mksquashfs \ diff --git a/core/config.mk b/core/config.mk index 5c4136a5d..feba92a24 100644 --- a/core/config.mk +++ b/core/config.mk @@ -674,7 +674,7 @@ endif APICHECK := $(HOST_OUT_EXECUTABLES)/apicheck$(HOST_EXECUTABLE_SUFFIX) FS_GET_STATS := $(HOST_OUT_EXECUTABLES)/fs_get_stats$(HOST_EXECUTABLE_SUFFIX) MAKE_EXT4FS := $(HOST_OUT_EXECUTABLES)/mke2fs$(HOST_EXECUTABLE_SUFFIX) -MKEXTUSERIMG := $(HOST_OUT_EXECUTABLES)/mkuserimg_mke2fs.sh +MKEXTUSERIMG := $(HOST_OUT_EXECUTABLES)/mkuserimg_mke2fs MKE2FS_CONF := system/extras/ext4_utils/mke2fs.conf BLK_ALLOC_TO_BASE_FS := $(HOST_OUT_EXECUTABLES)/blk_alloc_to_base_fs$(HOST_EXECUTABLE_SUFFIX) MAKE_SQUASHFS := $(HOST_OUT_EXECUTABLES)/mksquashfs$(HOST_EXECUTABLE_SUFFIX) diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py index 3e159a6c8..3fa322514 100755 --- a/tools/releasetools/build_image.py +++ b/tools/releasetools/build_image.py @@ -625,7 +625,7 @@ def BuildImage(in_dir, prop_dict, out_file, target_out=None): if "flash_logical_block_size" in prop_dict: build_command.extend(["-o", prop_dict["flash_logical_block_size"]]) # Specify UUID and hash_seed if using mke2fs. - if prop_dict["ext_mkuserimg"] == "mkuserimg_mke2fs.sh": + if prop_dict["ext_mkuserimg"] == "mkuserimg_mke2fs": if "uuid" in prop_dict: build_command.extend(["-U", prop_dict["uuid"]]) if "hash_seed" in prop_dict: diff --git a/tools/releasetools/test_build_image.py b/tools/releasetools/test_build_image.py index c91d00dea..40a7c8574 100644 --- a/tools/releasetools/test_build_image.py +++ b/tools/releasetools/test_build_image.py @@ -77,7 +77,7 @@ class BuildImageTest(unittest.TestCase): """Tests the result parsing from actual call to mke2fs.""" input_dir = common.MakeTempDir() output_image = common.MakeTempFile(suffix='.img') - command = ['mkuserimg_mke2fs.sh', input_dir, output_image, 'ext4', + command = ['mkuserimg_mke2fs', input_dir, output_image, 'ext4', '/system', '409600', '-j', '0'] ext4fs_output, exit_code = RunCommand(command) self.assertEqual(0, exit_code) diff --git a/tools/releasetools/test_validate_target_files.py b/tools/releasetools/test_validate_target_files.py index d62ea95a4..3ba89a139 100644 --- a/tools/releasetools/test_validate_target_files.py +++ b/tools/releasetools/test_validate_target_files.py @@ -121,13 +121,13 @@ class ValidateTargetFilesTest(unittest.TestCase): # Use an empty root directory. system_root = common.MakeTempDir() - cmd = ['mkuserimg_mke2fs.sh', '-s', system_root, output_file, 'ext4', + cmd = ['mkuserimg_mke2fs', '-s', system_root, output_file, 'ext4', '/system', str(adjusted_size), '-j', '0'] proc = common.Run(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) stdoutdata, _ = proc.communicate() self.assertEqual( 0, proc.returncode, - "Failed to create system image with mkuserimg_mke2fs.sh: {}".format( + "Failed to create system image with mkuserimg_mke2fs: {}".format( stdoutdata)) # Append the verity metadata.