Lines Matching refs:string

73   int GenerateOdexForTestWithStatus(const std::vector<std::string>& dex_locations,  in GenerateOdexForTestWithStatus()
74 const std::string& odex_location, in GenerateOdexForTestWithStatus()
76 std::string* error_msg, in GenerateOdexForTestWithStatus()
77 const std::vector<std::string>& extra_args = {}, in GenerateOdexForTestWithStatus()
80 std::vector<std::string> args;
82 for (const std::string& dex_location : dex_locations) {
111 const std::string& dex_location, in GenerateOdexForTest()
112 const std::string& odex_location, in GenerateOdexForTest()
114 const std::vector<std::string>& extra_args = {}, in GenerateOdexForTest()
132 const std::string& dex_location, in GenerateOdexForTest()
133 const std::string& odex_location, in GenerateOdexForTest()
135 const std::vector<std::string>& extra_args, in GenerateOdexForTest()
140 std::vector<std::string> dex_locations; in GenerateOdexForTest()
142 std::string loc_arg = "--zip-location=" + dex_location; in GenerateOdexForTest()
145 [&](const std::string& s) { return s == loc_arg; })); in GenerateOdexForTest()
148 [](const std::string& s) { return StartsWith(s, "--zip-fd="); })); in GenerateOdexForTest()
152 std::string error_msg; in GenerateOdexForTest()
210 int Dex2Oat(const std::vector<std::string>& dex2oat_args, std::string* error_msg) { in Dex2Oat()
211 std::vector<std::string> argv; in Dex2Oat()
238 argv.push_back("--android-root=" + std::string(android_root)); in Dex2Oat()
241 std::string all_args; in Dex2Oat()
242 for (const std::string& arg : argv) { in Dex2Oat()
259 std::string output_ = "";
260 std::string error_msg_ = "";
266 void RunTest(bool use_fd, bool expect_use, const std::vector<std::string>& extra_args = {}) { in RunTest()
267 std::string dex_location = GetScratchDir() + "/Dex2OatSwapTest.jar";
268 std::string odex_location = GetOdexDir() + "/Dex2OatSwapTest.odex";
272 std::vector<std::string> copy(extra_args);
279 std::string swap_location = GetOdexDir() + "/Dex2OatSwapTest.odex.swap";
289 virtual std::string GetTestDexFileName() { in GetTestDexFileName()
310 EXPECT_NE(output_.find("Large app, accepted running with swap."), std::string::npos) in CheckHostResult()
313 EXPECT_EQ(output_.find("Large app, accepted running with swap."), std::string::npos) in CheckHostResult()
336 EXPECT_NE(output_.find("dex2oat took"), std::string::npos) << output_; in CheckHostValidity()
369 EXPECT_NE(output_.find("Large app, accepted running with swap."), std::string::npos) in CheckHostResult()
372 EXPECT_EQ(output_.find("Large app, accepted running with swap."), std::string::npos) in CheckHostResult()
378 std::string GetTestDexFileName() override { in GetTestDexFileName()
470 std::string output_1 = output_; in TEST_F()
478 std::string output_2 = output_; in TEST_F()
499 const std::vector<std::string>& extra_args = {}) { in RunTest()
500 std::string dex_location = GetScratchDir() + "/DexNoOat.jar";
501 std::string odex_location = GetOdexDir() + "/DexOdexNoOat.odex";
502 std::string app_image_file = GetScratchDir() + "/Test.art";
506 std::vector<std::string> new_args(extra_args);
520 void CheckResult(const std::string& dex_location, in CheckResult()
521 const std::string& odex_location, in CheckResult()
522 const std::string& app_image_file, in CheckResult()
530 std::string error_msg; in CheckResult()
589 EXPECT_NE(output_.find("Very large app, downgrading to"), std::string::npos) << output_; in CheckHostResult()
591 EXPECT_EQ(output_.find("Very large app, downgrading to"), std::string::npos) << output_; in CheckHostResult()
611 EXPECT_NE(output_.find("dex2oat took"), std::string::npos) << output_; in CheckHostValidity()
649 void GenerateProfile(const std::string& test_profile, in GenerateProfile()
668 void CompileProfileOdex(const std::string& dex_location, in CompileProfileOdex()
669 const std::string& odex_location, in CompileProfileOdex()
670 const std::string& app_image_file_name, in CompileProfileOdex()
673 const std::vector<std::string>& extra_args = {}, in CompileProfileOdex()
675 const std::string profile_location = GetScratchDir() + "/primary.prof";
677 std::string error_msg;
685 std::vector<std::string> copy(extra_args);
707 uint64_t GetImageObjectSectionSize(const std::string& image_file_name) { in GetImageObjectSectionSize()
720 std::string dex_location = GetScratchDir() + "/DexNoOat.jar"; in RunTest()
721 std::string odex_location = GetOdexDir() + "/DexOdexNoOat.odex"; in RunTest()
722 std::string app_image_file = app_image ? (GetOdexDir() + "/DexOdexNoOat.art"): ""; in RunTest()
757 std::string dex_location = GetScratchDir() + "/DexNoOat.jar"; in RunTestVDex()
758 std::string odex_location = GetOdexDir() + "/DexOdexNoOat.odex"; in RunTestVDex()
759 std::string vdex_location = GetOdexDir() + "/DexOdexNoOat.vdex"; in RunTestVDex()
760 std::string app_image_file_name = GetOdexDir() + "/DexOdexNoOat.art"; in RunTestVDex()
767 std::string input_vdex = "--input-vdex-fd=-1"; in RunTestVDex()
768 std::string output_vdex = StringPrintf("--output-vdex-fd=%d", vdex_file1->Fd()); in RunTestVDex()
779 std::string input_vdex = StringPrintf("--input-vdex-fd=%d", vdex_file1->Fd()); in RunTestVDex()
780 std::string output_vdex = StringPrintf("--output-vdex-fd=%d", vdex_file2.GetFd()); in RunTestVDex()
795 void CheckResult(const std::string& dex_location, in CheckResult()
796 const std::string& odex_location, in CheckResult()
797 const std::string& app_image_file_name) { in CheckResult()
799 std::string error_msg; in CheckResult()
825 std::string old_class0 = old_dex_file->PrettyType(old_dex_file->GetClassDef(0).class_idx_); in CheckResult()
826 std::string old_class1 = old_dex_file->PrettyType(old_dex_file->GetClassDef(1).class_idx_); in CheckResult()
827 std::string new_class0 = new_dex_file->PrettyType(new_dex_file->GetClassDef(0).class_idx_); in CheckResult()
828 std::string new_class1 = new_dex_file->PrettyType(new_dex_file->GetClassDef(1).class_idx_); in CheckResult()
861 EXPECT_NE(output_.find("dex2oat took"), std::string::npos) << output_; in CheckHostValidity()
880 std::string dex_location = GetScratchDir() + "/UnquickenMultiDex.jar"; in RunUnquickenMultiDex()
881 std::string odex_location = GetOdexDir() + "/UnquickenMultiDex.odex"; in RunUnquickenMultiDex()
882 std::string vdex_location = GetOdexDir() + "/UnquickenMultiDex.vdex"; in RunUnquickenMultiDex()
889 std::string input_vdex = "--input-vdex-fd=-1"; in RunUnquickenMultiDex()
890 std::string output_vdex = StringPrintf("--output-vdex-fd=%d", vdex_file1->Fd()); in RunUnquickenMultiDex()
904 std::string input_vdex = StringPrintf("--input-vdex-fd=%d", vdex_file1->Fd()); in RunUnquickenMultiDex()
905 std::string output_vdex = StringPrintf("--output-vdex-fd=%d", vdex_file1->Fd()); in RunUnquickenMultiDex()
926 std::string dex_location = GetScratchDir() + "/UnquickenMultiDex.jar"; in RunUnquickenMultiDexCDex()
927 std::string odex_location = GetOdexDir() + "/UnquickenMultiDex.odex"; in RunUnquickenMultiDexCDex()
928 std::string odex_location2 = GetOdexDir() + "/UnquickenMultiDex2.odex"; in RunUnquickenMultiDexCDex()
929 std::string vdex_location = GetOdexDir() + "/UnquickenMultiDex.vdex"; in RunUnquickenMultiDexCDex()
930 std::string vdex_location2 = GetOdexDir() + "/UnquickenMultiDex2.vdex"; in RunUnquickenMultiDexCDex()
940 std::string input_vdex = "--input-vdex-fd=-1"; in RunUnquickenMultiDexCDex()
941 std::string output_vdex = StringPrintf("--output-vdex-fd=%d", vdex_file1->Fd()); in RunUnquickenMultiDexCDex()
952 std::string input_vdex = StringPrintf("--input-vdex-fd=%d", vdex_file1->Fd()); in RunUnquickenMultiDexCDex()
953 std::string output_vdex = StringPrintf("--output-vdex-fd=%d", vdex_file2->Fd()); in RunUnquickenMultiDexCDex()
967 void CheckResult(const std::string& dex_location, const std::string& odex_location) { in CheckResult()
968 std::string error_msg; in CheckResult()
992 void GetDexFileChecksums(const std::string& dex_location, in GetDexFileChecksums()
993 const std::string& odex_location, in GetDexFileChecksums()
995 std::string error_msg; in GetDexFileChecksums()
1021 void RunTest(bool expect_success, const std::vector<std::string>& extra_args = {}) { in RunTest()
1022 std::string dex_location = GetScratchDir() + "/Dex2OatSwapTest.jar";
1023 std::string odex_location = GetOdexDir() + "/Dex2OatSwapTest.odex";
1027 std::vector<std::string> copy(extra_args);
1029 std::string swap_location = GetOdexDir() + "/Dex2OatSwapTest.odex.swap";
1039 std::string GetTestDexFileName() { in GetTestDexFileName()
1068 int RunTest(const std::vector<std::string>& extra_args = {}) { in RunTest()
1069 std::string dex_location = GetScratchDir() + "/Dex2OatSwapTest.jar";
1070 std::string odex_location = GetOdexDir() + "/Dex2OatSwapTest.odex";
1074 std::string error_msg;
1082 std::string GetTestDexFileName() { in GetTestDexFileName()
1094 std::string dex_location = GetUsedDexLocation(); in RunTest()
1095 std::string odex_location = GetUsedOatLocation(); in RunTest()
1099 std::string error_msg; in RunTest()
1100 std::vector<std::string> extra_args; in RunTest()
1102 extra_args.push_back(std::string("--class-loader-context=") + class_loader_context); in RunTest()
1105 extra_args.push_back(std::string("--app-image-file=") + GetUsedImageLocation()); in RunTest()
1124 std::string GetUsedDexLocation() { in GetUsedDexLocation()
1128 std::string GetUsedOatLocation() { in GetUsedOatLocation()
1132 std::string GetUsedImageLocation() { in GetUsedImageLocation()
1154 std::string context = "PCL[" + GetUsedDexLocation() + "]"; in TEST_F()
1161 std::string context = "PCL[" + dex_files[0]->GetLocation() + "]"; in TEST_F()
1162 std::string expected_classpath_key = "PCL[" + in TEST_F()
1168 std::string stripped_classpath = GetScratchDir() + "/stripped_classpath.jar"; in TEST_F()
1171 std::string context = "PCL[" + stripped_classpath + "]"; in TEST_F()
1177 std::string stripped_classpath = GetScratchDir() + "/stripped_classpath.jar"; in TEST_F()
1178 std::string odex_for_classpath = GetOdexDir() + "/stripped_classpath.odex"; in TEST_F()
1191 std::string context = "PCL[" + stripped_classpath + "]"; in TEST_F()
1192 std::string expected_classpath_key; in TEST_F()
1217 std::string context = "PCL[does_not_exists.dex]"; in TEST_F()
1226 std::string context = "PCL[" + GetTestDexFileName("Nested") + "];" + in TEST_F()
1228 std::string expected_classpath_key = "PCL[" + CreateClassPathWithChecksums(dex_files1) + "];" + in TEST_F()
1238 std::string context = "PCL[" + GetTestDexFileName("Nested") + "]" + in TEST_F()
1240 std::string expected_classpath_key = "PCL[" + CreateClassPathWithChecksums(dex_files1) + "]" + in TEST_F()
1249 std::string context = "PCL[" + GetTestDexFileName("Nested") + "]" + in TEST_F()
1251 std::string expected_classpath_key = "PCL[" + CreateClassPathWithChecksums(dex_files1) + "]" + in TEST_F()
1264 std::string context = "PCL[" + GetTestDexFileName("Nested") + "]" + in TEST_F()
1267 std::string expected_classpath_key = "PCL[" + CreateClassPathWithChecksums(dex_files1) + "]" + in TEST_F()
1281 std::string context = "PCL[" + GetTestDexFileName("Nested") + "]" + in TEST_F()
1284 std::string expected_classpath_key = "PCL[" + CreateClassPathWithChecksums(dex_files1) + "]" + in TEST_F()
1298 std::string out_dir = GetScratchDir(); in TEST_F()
1299 const std::string base_oat_name = out_dir + "/base.oat"; in TEST_F()
1300 const std::string base_vdex_name = out_dir + "/base.vdex"; in TEST_F()
1301 const std::string unload_oat_name = out_dir + "/unload.oat"; in TEST_F()
1302 const std::string unload_vdex_name = out_dir + "/unload.vdex"; in TEST_F()
1303 const std::string no_unload_oat_name = out_dir + "/nounload.oat"; in TEST_F()
1304 const std::string no_unload_vdex_name = out_dir + "/nounload.vdex"; in TEST_F()
1305 std::string error_msg; in TEST_F()
1308 const std::string image_location = spaces[0]->GetImageLocation(); in TEST_F()
1408 const std::string dir = GetScratchDir(); in TEST_F()
1409 const std::string oat_filename = dir + "/base.oat"; in TEST_F()
1410 const std::string vdex_filename = dir + "/base.vdex"; in TEST_F()
1411 std::string error_msg; in TEST_F()
1516 const std::string dir = GetScratchDir(); in TEST_F()
1517 const std::string oat_filename = dir + "/base.oat"; in TEST_F()
1518 const std::string vdex_filename = dir + "/base.vdex"; in TEST_F()
1519 const std::string dex_location = GetTestDexFileName("MultiDex"); in TEST_F()
1520 std::string error_msg; in TEST_F()
1578 std::string out_dir = GetScratchDir(); in TEST_F()
1579 const std::string base_oat_name = out_dir + "/base.oat"; in TEST_F()
1580 std::string error_msg; in TEST_F()
1601 std::string out_dir = GetScratchDir(); in TEST_F()
1602 const std::string base_oat_name = out_dir + "/base.oat"; in TEST_F()
1603 std::string error_msg; in TEST_F()
1626 std::string out_dir = GetScratchDir(); in TEST_F()
1627 const std::string base_oat_name = out_dir + "/base.oat"; in TEST_F()
1657 std::string out_dir = GetScratchDir(); in TEST_F()
1658 const std::string base_oat_name = out_dir + "/base.oat"; in TEST_F()
1672 std::string out_dir = GetScratchDir(); in TEST_F()
1673 const std::string base_oat_name = out_dir + "/base.oat"; in TEST_F()
1674 std::string error_msg; in TEST_F()
1688 std::string out_dir = GetScratchDir(); in TEST_F()
1689 const std::string base_oat_name = out_dir + "/base.oat"; in TEST_F()
1690 std::string error_msg; in TEST_F()
1777 std::string out_dir = GetScratchDir(); in TEST_F()
1778 const std::string oat_filename = out_dir + "/base.oat"; in TEST_F()
1791 std::string error_msg; in TEST_F()
1829 const std::string& dex_location = apk_file.GetFilename(); in TEST_F()
1830 const std::string odex_location = GetOdexDir() + "/output.odex"; in TEST_F()
1839 std::string dex_location = GetScratchDir() + "/Dex2OatStderrLoggerTest.jar"; in TEST_F()
1840 std::string odex_location = GetOdexDir() + "/Dex2OatStderrLoggerTest.odex"; in TEST_F()
1852 EXPECT_NE(std::string::npos, output_.find("dex2oat took")); in TEST_F()
1856 std::string dex_location = GetScratchDir() + "/Dex2OatCompilationReason.jar"; in TEST_F()
1857 std::string odex_location = GetOdexDir() + "/Dex2OatCompilationReason.odex"; in TEST_F()
1867 std::string error_msg; in TEST_F()
1880 std::string dex_location = GetScratchDir() + "/Dex2OatNoCompilationReason.jar"; in TEST_F()
1881 std::string odex_location = GetOdexDir() + "/Dex2OatNoCompilationReason.odex"; in TEST_F()
1891 std::string error_msg; in TEST_F()
1905 std::string error_msg; in TEST_F()
1906 const std::string out_dir = GetScratchDir(); in TEST_F()
1907 const std::string dex_location = dex->GetLocation(); in TEST_F()
1908 const std::string odex_location = out_dir + "/base.oat"; in TEST_F()
1909 const std::string vdex_location = out_dir + "/base.vdex"; in TEST_F()
1984 std::string line; in TEST_F()
1986 const std::string kFastVerifyString = "Fast Verify"; in TEST_F()
1988 found_fast_verify = found_fast_verify || line.find(kFastVerifyString) != std::string::npos; in TEST_F()
2001 std::string error_msg; in TEST_F()
2021 const std::string& dex_location = temp_dex.GetFilename(); in TEST_F()
2022 std::string odex_location = GetOdexDir() + "/quickened.odex"; in TEST_F()
2023 std::string vdex_location = GetOdexDir() + "/quickened.vdex"; in TEST_F()
2027 std::string input_vdex = "--input-vdex-fd=-1"; in TEST_F()
2028 std::string output_vdex = StringPrintf("--output-vdex-fd=%d", vdex_output->Fd()); in TEST_F()
2039 std::string odex_location2 = GetOdexDir() + "/unquickened.odex"; in TEST_F()
2040 std::string vdex_location2 = GetOdexDir() + "/unquickened.vdex"; in TEST_F()
2043 std::string input_vdex = StringPrintf("--input-vdex-fd=%d", vdex_output->Fd()); in TEST_F()
2044 std::string output_vdex = StringPrintf("--output-vdex-fd=%d", vdex_unquickened->Fd()); in TEST_F()
2097 const std::string& dex_location = invalid_dex.GetFilename(); in TEST_F()
2098 const std::string odex_location = GetOdexDir() + "/output.odex"; in TEST_F()
2099 std::string error_msg; in TEST_F()
2136 std::string error_msg; in TEST_F()
2158 const std::string out_dir = GetScratchDir(); in TEST_F()
2159 const std::string odex_location = out_dir + "/base.odex"; in TEST_F()
2169 std::string error_msg; in TEST_F()
2188 std::string zip_location = GetTestDexFileName("MainUncompressedAligned"); in TEST_F()
2190 std::vector<std::string> extra_args{ in TEST_F()
2194 std::string out_dir = GetScratchDir(); in TEST_F()
2195 const std::string base_oat_name = out_dir + "/base.oat"; in TEST_F()
2209 const std::string& dex_location = temp_dex.GetFilename(); in TEST_F()
2245 const std::string out_dir = GetScratchDir(); in TEST_F()
2246 const std::string odex_location = out_dir + "/base.odex"; in TEST_F()
2247 const std::string app_image_location = out_dir + "/base.art"; in TEST_F()
2259 std::string error_msg; in TEST_F()
2270 std::string error_msg; in TEST_F()
2271 std::string zip_location = GetTestDexFileName("Main"); in TEST_F()
2279 std::string entry_name = DexFileLoader::GetMultiDexClassesDexName(0); in TEST_F()
2284 const std::string& dex_location = dex_file.GetFilename(); in TEST_F()
2285 const std::string base_oat_name = GetScratchDir() + "/base.oat"; in TEST_F()
2291 std::vector<std::string> extra_args{ in TEST_F()
2309 const std::string& dex_location = temp_dex.GetFilename(); in TEST_F()
2317 if (accessor.GetDescriptor() == std::string("LStringLiterals$StartupClass;")) { in TEST_F()
2321 std::string method_name(dex->GetMethodName(dex->GetMethodId(method.GetIndex()))); in TEST_F()
2365 const std::string out_dir = GetScratchDir(); in TEST_F()
2366 const std::string odex_location = out_dir + "/base.odex"; in TEST_F()
2367 const std::string app_image_location = out_dir + "/base.art"; in TEST_F()
2379 std::string error_msg; in TEST_F()
2395 std::set<std::string> seen; in TEST_F()
2404 std::set<std::string> preresolved_seen; in TEST_F()
2413 ObjPtr<mirror::String> string = preresolved_strings[i].Read<kWithoutReadBarrier>(); in TEST_F()
2414 if (string != nullptr) { in TEST_F()
2415 preresolved_seen.insert(string->ToModifiedUtf8()); in TEST_F()
2423 for (const std::string& str : preresolved_seen) { in TEST_F()
2442 std::set<std::string> boot_image_strings; in TEST_F()
2443 std::set<std::string> app_image_strings; in TEST_F()
2462 const std::string out_dir = GetScratchDir(); in TEST_F()
2463 const std::string odex_location = out_dir + "/base.odex"; in TEST_F()
2464 const std::string valid_context = "PCL[" + dex_files[0]->GetLocation() + "]"; in TEST_F()
2465 const std::string stored_context = "PCL[/system/not_real_lib.jar]"; in TEST_F()
2466 std::string expected_stored_context = "PCL["; in TEST_F()
2509 void RunTest(const std::vector<std::string>& extra_args = {}) { in RunTest()
2510 std::string dex_location = GetScratchDir() + "/Dex2OatSwapTest.jar";
2511 std::string odex_location = GetOdexDir() + "/Dex2OatSwapTest.odex";
2521 std::string GetTestDexFileName() { in GetTestDexFileName()
2527 std::vector<std::string> argv; in TEST_F()
2546 std::string out_dir = GetScratchDir(); in TEST_F()
2547 const std::string base_oat_name = out_dir + "/base.oat"; in TEST_F()
2548 std::string error_msg; in TEST_F()