diff options
author | 2021-05-20 15:14:25 -0700 | |
---|---|---|
committer | 2021-05-24 20:05:49 +0000 | |
commit | 61ffd049d8d6946ba52884a8f679dde0e3a6654d (patch) | |
tree | 6ce3787caae6d00bfb30165786fe40d42a86e045 /runtime/parsed_options_test.cc | |
parent | 6d8d68efbe2101e2d5fdf078556cbc1f286c37c7 (diff) |
Make the runtime option -Ximage a ParseStringList
Previously, the string spliting is done in multiple code locations,
including ImageSpace::BootImageLayout::LoadOrValidate and
GetPrimaryImageLocation (which may be called multiple times).
This change converts the -Ximage option from a string into a
ParseStringList<':'>.
It may be worth pointing out that this doesn't change the current code
expectation that each image can have a profile (e.g.
"/path/to/foo.art!/some/profile.prof").
There is a later plan to introduce new options of boot image fds with
ParseIntList<':'>. This change would make them more consistent.
Bug: 187327262
Test: boot looks normal
Test: dexopt looks normal
Test: TH
Change-Id: I82657cb725cda2d3b782cbe7a6e6d9a871e80ee7
Diffstat (limited to 'runtime/parsed_options_test.cc')
-rw-r--r-- | runtime/parsed_options_test.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/parsed_options_test.cc b/runtime/parsed_options_test.cc index 8873eb9c60..b9ca98883e 100644 --- a/runtime/parsed_options_test.cc +++ b/runtime/parsed_options_test.cc @@ -86,7 +86,9 @@ TEST_F(ParsedOptionsTest, ParsedOptions) { EXPECT_PARSED_EQ_AS_STRING_VECTOR(expected_boot_class_path, Opt::BootClassPath); EXPECT_PARSED_EQ(class_path, Opt::ClassPath); - EXPECT_PARSED_EQ(std::string("boot_image"), Opt::Image); + std::vector<std::string> boot_images = map.GetOrDefault(Opt::Image); + ASSERT_EQ(1U, boot_images.size()); + EXPECT_EQ(std::string("boot_image"), boot_images[0]); EXPECT_PARSED_EXISTS(Opt::CheckJni); EXPECT_PARSED_EQ(2048U, Opt::MemoryInitialSize); EXPECT_PARSED_EQ(4 * KB, Opt::MemoryMaximumSize); |