summaryrefslogtreecommitdiff
path: root/odrefresh/odrefresh_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'odrefresh/odrefresh_test.cc')
-rw-r--r--odrefresh/odrefresh_test.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/odrefresh/odrefresh_test.cc b/odrefresh/odrefresh_test.cc
index 91e1f66803..424b606ff8 100644
--- a/odrefresh/odrefresh_test.cc
+++ b/odrefresh/odrefresh_test.cc
@@ -994,5 +994,22 @@ TEST_F(OdRefreshTest, CompileSystemServerChoosesBootImage_OnSystem) {
ExitCode::kCompilationSuccess);
}
+TEST_F(OdRefreshTest, OnlyBootImages) {
+ config_.SetOnlyBootImages(true);
+
+ // Primary.
+ EXPECT_CALL(*mock_exec_utils_, DoExecAndReturnCode(Contains(Flag("--dex-file=", core_oj_jar_))))
+ .Times(2)
+ .WillRepeatedly(Return(0));
+
+ // Mainline extension.
+ EXPECT_CALL(*mock_exec_utils_, DoExecAndReturnCode(Contains(Flag("--dex-file=", conscrypt_jar_))))
+ .Times(2)
+ .WillRepeatedly(Return(0));
+
+ EXPECT_EQ(odrefresh_->Compile(*metrics_, CompilationOptions::CompileAll(*odrefresh_)),
+ ExitCode::kCompilationSuccess);
+}
+
} // namespace odrefresh
} // namespace art