Re-enable disabled dex2oat tests for compact dex.
Since compact dex is incompatible with update_input_vdex, explicit
pass down the option to disable.
Test: test-art-host-gtest
Bug: 63756964
Bug: 70930171
Change-Id: Ib7b1e79157414677d288d217de3140f51171569c
diff --git a/dex2oat/dex2oat_test.cc b/dex2oat/dex2oat_test.cc
index f817def..f176cc2 100644
--- a/dex2oat/dex2oat_test.cc
+++ b/dex2oat/dex2oat_test.cc
@@ -44,6 +44,7 @@
static constexpr size_t kMaxMethodIds = 65535;
static constexpr bool kDebugArgs = false;
+static const char* kDisableCompactDex = "--compact-dex-level=none";
using android::base::StringPrintf;
@@ -776,7 +777,7 @@
app_image_file_name,
/* use_fd */ true,
/* num_profile_classes */ 1,
- { input_vdex, output_vdex });
+ { input_vdex, output_vdex, kDisableCompactDex });
EXPECT_GT(vdex_file1->GetLength(), 0u);
}
{
@@ -788,7 +789,7 @@
app_image_file_name,
/* use_fd */ true,
/* num_profile_classes */ 1,
- { input_vdex, output_vdex },
+ { input_vdex, output_vdex, kDisableCompactDex },
/* expect_success */ true);
EXPECT_GT(vdex_file2.GetFile()->GetLength(), 0u);
}
@@ -876,8 +877,6 @@
}
TEST_F(Dex2oatLayoutTest, TestVdexLayout) {
- // Disabled until figure out running compact dex + DexLayout causes quickening errors.
- TEST_DISABLED_FOR_COMPACT_DEX();
RunTestVDex();
}
@@ -898,7 +897,7 @@
GenerateOdexForTest(dex_location,
odex_location,
CompilerFilter::kQuicken,
- { input_vdex, output_vdex },
+ { input_vdex, output_vdex, kDisableCompactDex },
/* expect_success */ true,
/* use_fd */ true);
EXPECT_GT(vdex_file1->GetLength(), 0u);
@@ -910,7 +909,7 @@
GenerateOdexForTest(dex_location,
odex_location,
CompilerFilter::kVerify,
- { input_vdex, output_vdex },
+ { input_vdex, output_vdex, kDisableCompactDex },
/* expect_success */ true,
/* use_fd */ true);
}
@@ -945,7 +944,7 @@
if (class_it.IsAtMethod() && class_it.GetMethodCodeItem() != nullptr) {
for (const DexInstructionPcPair& inst :
CodeItemInstructionAccessor(*dex_file, class_it.GetMethodCodeItem())) {
- ASSERT_FALSE(inst->IsQuickened());
+ ASSERT_FALSE(inst->IsQuickened()) << output_;
}
}
}
@@ -956,8 +955,6 @@
};
TEST_F(Dex2oatUnquickenTest, UnquickenMultiDex) {
- // Disabled until figure out running compact dex + DexLayout causes quickening errors.
- TEST_DISABLED_FOR_COMPACT_DEX();
RunUnquickenMultiDex();
}