Revert^4 "Add "linkage" test options""
This reverts commit 16c08ca97486f535698f1a1b17f0332bfe78e95a.
Reason for revert: Disabled on device testing
Change-Id: I8d5442e0ebb6383ebfbce98f1857b5e844e0d5e1
Bug: none
Test: make test-art-host-gtest-dex2oat_test
diff --git a/dex2oat/dex2oat_test.cc b/dex2oat/dex2oat_test.cc
index 687e3ff..db0eb8a 100644
--- a/dex2oat/dex2oat_test.cc
+++ b/dex2oat/dex2oat_test.cc
@@ -2422,4 +2422,29 @@
RunTest();
}
+class LinkageTest : public Dex2oatTest {};
+
+TEST_F(LinkageTest, LinkageEnabled) {
+ TEST_DISABLED_FOR_TARGET();
+ std::unique_ptr<const DexFile> dex(OpenTestDexFile("LinkageTest"));
+ std::string out_dir = GetScratchDir();
+ const std::string base_oat_name = out_dir + "/base.oat";
+ std::string error_msg;
+ const int res_fail = GenerateOdexForTestWithStatus(
+ {dex->GetLocation()},
+ base_oat_name,
+ CompilerFilter::Filter::kQuicken,
+ &error_msg,
+ {"--check-linkage-conditions", "--crash-on-linkage-violation"});
+ EXPECT_NE(0, res_fail);
+
+ const int res_no_fail = GenerateOdexForTestWithStatus(
+ {dex->GetLocation()},
+ base_oat_name,
+ CompilerFilter::Filter::kQuicken,
+ &error_msg,
+ {"--check-linkage-conditions"});
+ EXPECT_EQ(0, res_no_fail);
+}
+
} // namespace art