Revert^2 "Pass boot class path to ImageSpace::LoadBootImage."
This reverts commit db4b1deebf425be5f1d0f597d1ef540f19908324.
Fixed JDWP tests, see "Test:" stanzas below.
Change-Id: I6fb56ac990b78164cbd3f93c9f6df66e0dd9a813
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: Pixel 2 XL boots.
Test: m test-art-target-gtest
Test: testrunner.py --target --optimizing
Test: run-libcore-tests.sh --mode=device --variant=X64
Test: run-jdwp-tests.sh --mode=host --variant=X64
Test: run-jdwp-tests.sh --mode=device --variant=X64
Bug: 119868597
diff --git a/cmdline/cmdline_parser_test.cc b/cmdline/cmdline_parser_test.cc
index 97daafa..101e5c4 100644
--- a/cmdline/cmdline_parser_test.cc
+++ b/cmdline/cmdline_parser_test.cc
@@ -63,6 +63,12 @@
return expected == actual;
}
+ template <char Separator>
+ bool UsuallyEquals(const std::vector<std::string>& expected,
+ const ParseStringList<Separator>& actual) {
+ return expected == static_cast<std::vector<std::string>>(actual);
+ }
+
// Try to use memcmp to compare simple plain-old-data structs.
//
// This should *not* generate false positives, but it can generate false negatives.
@@ -218,8 +224,13 @@
}
EXPECT_SINGLE_PARSE_EXISTS("-Xzygote", M::Zygote);
- EXPECT_SINGLE_PARSE_VALUE_STR("/hello/world", "-Xbootclasspath:/hello/world", M::BootClassPath);
- EXPECT_SINGLE_PARSE_VALUE("/hello/world", "-Xbootclasspath:/hello/world", M::BootClassPath);
+ EXPECT_SINGLE_PARSE_VALUE(std::vector<std::string>({"/hello/world"}),
+ "-Xbootclasspath:/hello/world",
+ M::BootClassPath);
+ EXPECT_SINGLE_PARSE_VALUE(std::vector<std::string>({"/hello", "/world"}),
+ "-Xbootclasspath:/hello:/world",
+ M::BootClassPath);
+ EXPECT_SINGLE_PARSE_VALUE_STR("/hello/world", "-classpath /hello/world", M::ClassPath);
EXPECT_SINGLE_PARSE_VALUE(Memory<1>(234), "-Xss234", M::StackSize);
EXPECT_SINGLE_PARSE_VALUE(MemoryKiB(1234*MB), "-Xms1234m", M::MemoryInitialSize);
EXPECT_SINGLE_PARSE_VALUE(true, "-XX:EnableHSpaceCompactForOOM", M::EnableHSpaceCompactForOOM);