diff options
author | 2018-12-07 18:04:10 +0000 | |
---|---|---|
committer | 2018-12-07 18:13:55 +0000 | |
commit | 91f1032505cfaec3aef51fc0a3085b213813f0ed (patch) | |
tree | 6469e772d9fb562d26dc1d22dd0b71844bbb743f /runtime/parsed_options_test.cc | |
parent | 573b3877fac3c5a4a9703301502694fe7219b21c (diff) |
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
Diffstat (limited to 'runtime/parsed_options_test.cc')
-rw-r--r-- | runtime/parsed_options_test.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/runtime/parsed_options_test.cc b/runtime/parsed_options_test.cc index 705cc6c5e2..cbb7b825d3 100644 --- a/runtime/parsed_options_test.cc +++ b/runtime/parsed_options_test.cc @@ -40,8 +40,7 @@ TEST_F(ParsedOptionsTest, ParsedOptions) { boot_class_path += "-Xbootclasspath:"; bool first_dex_file = true; - for (const std::string &dex_file_name : - CommonRuntimeTest::GetLibCoreDexFileNames()) { + for (const std::string &dex_file_name : CommonRuntimeTest::GetLibCoreDexFileNames()) { if (!first_dex_file) { class_path += ":"; } else { @@ -50,6 +49,8 @@ TEST_F(ParsedOptionsTest, ParsedOptions) { class_path += dex_file_name; } boot_class_path += class_path; + std::vector<std::string> expected_boot_class_path; + Split(class_path, ':', &expected_boot_class_path); RuntimeOptions options; options.push_back(std::make_pair(boot_class_path.c_str(), nullptr)); @@ -78,9 +79,11 @@ TEST_F(ParsedOptionsTest, ParsedOptions) { using Opt = RuntimeArgumentMap; #define EXPECT_PARSED_EQ(expected, actual_key) EXPECT_EQ(expected, map.GetOrDefault(actual_key)) +#define EXPECT_PARSED_EQ_AS_STRING_VECTOR(expected, actual_key) \ + EXPECT_EQ(expected, static_cast<std::vector<std::string>>(map.GetOrDefault(actual_key))) #define EXPECT_PARSED_EXISTS(actual_key) EXPECT_TRUE(map.Exists(actual_key)) - EXPECT_PARSED_EQ(class_path, Opt::BootClassPath); + 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); EXPECT_PARSED_EXISTS(Opt::CheckJni); |