diff options
author | 2018-02-20 18:30:42 +0000 | |
---|---|---|
committer | 2018-02-20 18:30:42 +0000 | |
commit | 535d381b8b14faa8711a003ce3de3f70ac7ac08e (patch) | |
tree | 83465ad03d4669221acced7df7ae6cfa2be39a95 /patchoat/patchoat_test.cc | |
parent | d43e02bc798290f8d403cc4db8a365f18c833688 (diff) | |
parent | 88c6d26dd8686bdb366d54937a505f10f3bf1cd8 (diff) |
Merge "patchoat: take directories instead of filenames"
Diffstat (limited to 'patchoat/patchoat_test.cc')
-rw-r--r-- | patchoat/patchoat_test.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/patchoat/patchoat_test.cc b/patchoat/patchoat_test.cc index 69c6bfae30..ac3abd0642 100644 --- a/patchoat/patchoat_test.cc +++ b/patchoat/patchoat_test.cc @@ -137,32 +137,32 @@ class PatchoatTest : public DexoptTest { } bool RelocateBootImage(const std::string& input_image_location, - const std::string& output_image_filename, + const std::string& output_image_directory, off_t base_offset_delta, std::string* error_msg) { std::vector<std::string> argv = BasePatchoatCommand(input_image_location, base_offset_delta); - argv.push_back("--output-image-file=" + output_image_filename); + argv.push_back("--output-image-directory=" + output_image_directory); return RunDex2OatOrPatchoat(argv, error_msg); } bool VerifyBootImage(const std::string& input_image_location, - const std::string& output_image_filename, + const std::string& output_image_directory, off_t base_offset_delta, std::string* error_msg) { std::vector<std::string> argv = BasePatchoatCommand(input_image_location, base_offset_delta); - argv.push_back("--output-image-file=" + output_image_filename); + argv.push_back("--output-image-directory=" + output_image_directory); argv.push_back("--verify"); return RunDex2OatOrPatchoat(argv, error_msg); } bool GenerateBootImageRelFile(const std::string& input_image_location, - const std::string& output_rel_filename, + const std::string& output_rel_directory, off_t base_offset_delta, std::string* error_msg) { std::vector<std::string> argv = BasePatchoatCommand(input_image_location, base_offset_delta); - argv.push_back("--output-image-relocation-file=" + output_rel_filename); + argv.push_back("--output-image-relocation-directory=" + output_rel_directory); return RunDex2OatOrPatchoat(argv, error_msg); } @@ -375,7 +375,7 @@ TEST_F(PatchoatTest, PatchoatRelocationSameAsDex2oatRelocation) { ASSERT_EQ(0, symlink(dex2oat_orig_dir.c_str(), dex2oat_orig_with_arch_dir.c_str())); if (!RelocateBootImage( dex2oat_orig_dir + "/boot.art", - patchoat_dir + "/boot.art", + patchoat_dir, base_addr_delta, &error_msg)) { FAIL() << "RelocateBootImage failed: " << error_msg; @@ -467,7 +467,7 @@ TEST_F(PatchoatTest, RelFileVerification) { off_t base_addr_delta = 0x100000; if (!GenerateBootImageRelFile( dex2oat_orig_dir + "/boot.art", - dex2oat_orig_dir + "/boot.art.rel", + dex2oat_orig_dir, base_addr_delta, &error_msg)) { FAIL() << "RelocateBootImage failed: " << error_msg; @@ -483,7 +483,7 @@ TEST_F(PatchoatTest, RelFileVerification) { base_addr_delta -= 0x10000; if (!RelocateBootImage( dex2oat_orig_dir + "/boot.art", - relocated_dir + "/boot.art", + relocated_dir, base_addr_delta, &error_msg)) { FAIL() << "RelocateBootImage failed: " << error_msg; @@ -524,7 +524,7 @@ TEST_F(PatchoatTest, RelFileVerification) { // Assert that verification works with the .rel files. if (!VerifyBootImage( dex2oat_orig_dir + "/boot.art", - relocated_dir + "/boot.art", + relocated_dir, base_addr_delta, &error_msg)) { FAIL() << "VerifyBootImage failed: " << error_msg; |