diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2017-11-20 15:10:28 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2017-12-13 22:23:12 +0000 |
commit | ae7e83817e546848ef6b2949dd9065b153e14316 (patch) | |
tree | e46ea86e925c4b2a4237f5ebba0c7ba3d61b0359 /dex2oat/dex2oat_test.cc | |
parent | dc93cac66f1db225474cec5bf0350fd7a148085e (diff) | |
download | art-ae7e83817e546848ef6b2949dd9065b153e14316.tar.gz art-ae7e83817e546848ef6b2949dd9065b153e14316.tar.bz2 art-ae7e83817e546848ef6b2949dd9065b153e14316.zip |
Don't embed the dex code in the oat file if dex is uncompressed.
Take uncompressed dex code as a signal that the app wants to
opt into b/63920015.
bug: 63920015
Test: dex2oat_test, 071-dexfile-clean-map
Change-Id: I878e7bb80fc895a2d9aafe81aa7666b86af1f808
Diffstat (limited to 'dex2oat/dex2oat_test.cc')
-rw-r--r-- | dex2oat/dex2oat_test.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/dex2oat/dex2oat_test.cc b/dex2oat/dex2oat_test.cc index ad287b0745..41f2c70267 100644 --- a/dex2oat/dex2oat_test.cc +++ b/dex2oat/dex2oat_test.cc @@ -1513,4 +1513,19 @@ TEST_F(Dex2oatDedupeCode, DedupeTest) { EXPECT_LT(dedupe_size, no_dedupe_size); } +TEST_F(Dex2oatTest, UncompressedTest) { + std::unique_ptr<const DexFile> dex(OpenTestDexFile("MainUncompressed")); + std::string out_dir = GetScratchDir(); + const std::string base_oat_name = out_dir + "/base.oat"; + GenerateOdexForTest(dex->GetLocation(), + base_oat_name, + CompilerFilter::Filter::kQuicken, + { }, + true, // expect_success + false, // use_fd + [](const OatFile& o) { + CHECK(!o.ContainsDexCode()); + }); +} + } // namespace art |