Lines Matching refs:string
69 int GenerateOdexForTestWithStatus(const std::vector<std::string>& dex_locations, in GenerateOdexForTestWithStatus()
70 const std::string& odex_location, in GenerateOdexForTestWithStatus()
72 std::string* error_msg, in GenerateOdexForTestWithStatus()
73 const std::vector<std::string>& extra_args = {}, in GenerateOdexForTestWithStatus()
76 std::vector<std::string> args;
79 for (const std::string& dex_location : dex_locations) {
107 ::testing::AssertionResult GenerateOdexForTest(const std::string& dex_location, in GenerateOdexForTest()
108 const std::string& odex_location, in GenerateOdexForTest()
110 const std::vector<std::string>& extra_args = {}, in GenerateOdexForTest()
127 ::testing::AssertionResult GenerateOdexForTest(const std::string& dex_location, in GenerateOdexForTest()
128 const std::string& odex_location, in GenerateOdexForTest()
130 const std::vector<std::string>& extra_args, in GenerateOdexForTest()
135 std::vector<std::string> dex_locations; in GenerateOdexForTest()
137 std::string loc_arg = "--zip-location=" + dex_location; in GenerateOdexForTest()
138 CHECK(std::any_of(extra_args.begin(), extra_args.end(), [&](const std::string& s) { in GenerateOdexForTest()
141 CHECK(std::any_of(extra_args.begin(), extra_args.end(), [](const std::string& s) { in GenerateOdexForTest()
147 std::string error_msg; in GenerateOdexForTest()
201 std::string output_ = "";
202 std::string error_msg_ = "";
220 void RunTest(bool use_fd, bool expect_use, const std::vector<std::string>& extra_args = {}) { in RunTest()
221 std::string dex_location = GetScratchDir() + "/Dex2OatSwapTest.jar";
222 std::string odex_location = GetOdexDir() + "/Dex2OatSwapTest.odex";
226 std::vector<std::string> copy(extra_args);
233 std::string swap_location = GetOdexDir() + "/Dex2OatSwapTest.odex.swap";
242 virtual std::string GetTestDexFileName() { in GetTestDexFileName()
263 EXPECT_NE(output_.find("Large app, accepted running with swap."), std::string::npos) in CheckHostResult()
266 EXPECT_EQ(output_.find("Large app, accepted running with swap."), std::string::npos) in CheckHostResult()
289 EXPECT_NE(output_.find("dex2oat took"), std::string::npos) << output_; in CheckHostValidity()
322 EXPECT_NE(output_.find("Large app, accepted running with swap."), std::string::npos) in CheckHostResult()
325 EXPECT_EQ(output_.find("Large app, accepted running with swap."), std::string::npos) in CheckHostResult()
331 std::string GetTestDexFileName() override { in GetTestDexFileName()
423 std::string output_1 = output_; in TEST_F()
431 std::string output_2 = output_; in TEST_F()
452 const std::vector<std::string>& extra_args = {}) { in RunTest()
460 const std::vector<std::string>& extra_args = {}) { in RunTest()
461 std::string dex_location = GetScratchDir() + "/DexNoOat.jar";
462 std::string odex_location = GetOdexDir() + "/DexOdexNoOat.odex";
463 std::string app_image_file = GetScratchDir() + "/Test.art";
467 std::vector<std::string> new_args(extra_args);
480 void CheckResult(const std::string& dex_location, in CheckResult()
481 const std::string& odex_location, in CheckResult()
482 const std::string& app_image_file, in CheckResult()
490 std::string error_msg; in CheckResult()
547 EXPECT_NE(output_.find("Very large app, downgrading to"), std::string::npos) << output_; in CheckHostResult()
549 EXPECT_EQ(output_.find("Very large app, downgrading to"), std::string::npos) << output_; in CheckHostResult()
569 EXPECT_NE(output_.find("dex2oat took"), std::string::npos) << output_; in CheckHostValidity()
601 void GenerateProfile(const std::string& test_profile, in GenerateProfile()
602 const std::string& dex_location, in GenerateProfile()
606 std::string error_msg; in GenerateProfile()
630 void CompileProfileOdex(const std::string& dex_location, in CompileProfileOdex()
631 const std::string& odex_location, in CompileProfileOdex()
632 const std::string& app_image_file_name, in CompileProfileOdex()
634 const std::vector<std::string>& profile_locations, in CompileProfileOdex()
635 const std::vector<std::string>& extra_args = {}, in CompileProfileOdex()
637 std::vector<std::string> copy(extra_args);
638 for (const std::string& profile_location : profile_locations) {
659 void CompileProfileOdex(const std::string& dex_location, in CompileProfileOdex()
660 const std::string& odex_location, in CompileProfileOdex()
661 const std::string& app_image_file_name, in CompileProfileOdex()
664 const std::vector<std::string>& extra_args = {}, in CompileProfileOdex()
666 const std::string profile_location = GetScratchDir() + "/primary.prof";
677 uint32_t GetImageObjectSectionSize(const std::string& image_file_name) { in GetImageObjectSectionSize()
690 std::string dex_location = GetScratchDir() + "/DexNoOat.jar"; in RunTest()
691 std::string odex_location = GetOdexDir() + "/DexOdexNoOat.odex"; in RunTest()
692 std::string app_image_file = app_image ? (GetOdexDir() + "/DexOdexNoOat.art") : ""; in RunTest()
726 void CheckCompilerFilter(const std::string& dex_location, in CheckCompilerFilter()
727 const std::string& odex_location, in CheckCompilerFilter()
729 std::string error_msg; in CheckCompilerFilter()
741 std::string dex_location = GetScratchDir() + "/DexNoOat.jar"; in RunTestVDex()
742 std::string odex_location = GetOdexDir() + "/DexOdexNoOat.odex"; in RunTestVDex()
743 std::string vdex_location = GetOdexDir() + "/DexOdexNoOat.vdex"; in RunTestVDex()
744 std::string app_image_file_name = GetOdexDir() + "/DexOdexNoOat.art"; in RunTestVDex()
751 std::string input_vdex = "--input-vdex-fd=-1"; in RunTestVDex()
752 std::string output_vdex = StringPrintf("--output-vdex-fd=%d", vdex_file1->Fd()); in RunTestVDex()
763 std::string input_vdex = StringPrintf("--input-vdex-fd=%d", vdex_file1->Fd()); in RunTestVDex()
764 std::string output_vdex = StringPrintf("--output-vdex-fd=%d", vdex_file2.GetFd()); in RunTestVDex()
778 void CheckResult(const std::string& dex_location, in CheckResult()
779 const std::string& odex_location, in CheckResult()
780 const std::string& app_image_file_name) { in CheckResult()
782 std::string error_msg; in CheckResult()
808 std::string old_class0 = old_dex_file->PrettyType(old_dex_file->GetClassDef(0).class_idx_); in CheckResult()
809 std::string old_class1 = old_dex_file->PrettyType(old_dex_file->GetClassDef(1).class_idx_); in CheckResult()
810 std::string new_class0 = new_dex_file->PrettyType(new_dex_file->GetClassDef(0).class_idx_); in CheckResult()
811 std::string new_class1 = new_dex_file->PrettyType(new_dex_file->GetClassDef(1).class_idx_); in CheckResult()
844 EXPECT_NE(output_.find("dex2oat took"), std::string::npos) << output_; in CheckHostValidity()
853 std::string dex_location = GetScratchDir() + "/DexNoOat.jar"; in TEST_F()
854 std::string odex_location = GetOdexDir() + "/DexOdexNoOat.odex"; in TEST_F()
855 std::string app_image_file = GetOdexDir() + "/DexOdexNoOat.art"; in TEST_F()
867 std::string error_msg; in TEST_F()
882 std::string dex_location = GetScratchDir() + "/Dex.jar"; in TEST_F()
883 std::string odex_location = GetOdexDir() + "/Dex.odex"; in TEST_F()
884 std::string app_image_file = GetOdexDir() + "/Dex.art"; in TEST_F()
887 const std::string profile1_location = GetScratchDir() + "/primary.prof"; in TEST_F()
896 const std::string profile2_location = GetScratchDir() + "/secondary.prof"; in TEST_F()
921 std::string dex_location = GetScratchDir() + "/Dex.jar"; in TEST_F()
925 const std::string profile_old = GetScratchDir() + "/profile_old.prof"; in TEST_F()
929 const std::string profile_new = GetScratchDir() + "/profile_new.prof"; in TEST_F()
933 const std::string profile_empty = GetScratchDir() + "/profile_empty.prof"; in TEST_F()
936 std::string odex_location = GetOdexDir() + "/Dex.odex"; in TEST_F()
937 std::string app_image_file = GetOdexDir() + "/Dex.art"; in TEST_F()
974 void RunTest(bool expect_success, const std::vector<std::string>& extra_args = {}) { in RunTest()
975 std::string dex_location = GetScratchDir() + "/Dex2OatSwapTest.jar";
976 std::string odex_location = GetOdexDir() + "/Dex2OatSwapTest.odex";
980 std::vector<std::string> copy(extra_args);
982 std::string swap_location = GetOdexDir() + "/Dex2OatSwapTest.odex.swap";
989 std::string GetTestDexFileName() { return GetDexSrc1(); } in GetTestDexFileName()
1016 int RunTest(const std::vector<std::string>& extra_args = {}) { in RunTest()
1017 std::string dex_location = GetScratchDir() + "/Dex2OatSwapTest.jar";
1018 std::string odex_location = GetOdexDir() + "/Dex2OatSwapTest.odex";
1022 std::string error_msg;
1027 std::string GetTestDexFileName() { return GetDexSrc1(); } in GetTestDexFileName()
1037 std::string dex_location = GetUsedDexLocation(); in RunTest()
1038 std::string odex_location = GetUsedOatLocation(); in RunTest()
1042 std::string error_msg; in RunTest()
1043 std::vector<std::string> extra_args; in RunTest()
1045 extra_args.push_back(std::string("--class-loader-context=") + class_loader_context); in RunTest()
1048 extra_args.push_back(std::string("--app-image-file=") + GetUsedImageLocation()); in RunTest()
1067 std::string GetUsedDexLocation() { return GetScratchDir() + "/Context.jar"; } in GetUsedDexLocation()
1069 std::string GetUsedOatLocation() { return GetOdexDir() + "/Context.odex"; } in GetUsedOatLocation()
1071 std::string GetUsedImageLocation() { return GetOdexDir() + "/Context.art"; } in GetUsedImageLocation()
1085 std::string context = "PCL[" + GetUsedDexLocation() + "]"; in TEST_F()
1094 std::string context = "PCL[" + dex_files[0]->GetLocation() + "]"; in TEST_F()
1095 std::string expected_classpath_key = in TEST_F()
1101 std::string resource_only_classpath = GetScratchDir() + "/resource_only_classpath.jar"; in TEST_F()
1104 std::string context = "PCL[" + resource_only_classpath + "]"; in TEST_F()
1110 std::string context = "PCL[does_not_exists.dex]"; in TEST_F()
1119 std::string context = in TEST_F()
1121 std::string expected_classpath_key = "PCL[" + CreateClassPathWithChecksums(dex_files1) + "];" + in TEST_F()
1131 std::string context = in TEST_F()
1133 std::string expected_classpath_key = "PCL[" + CreateClassPathWithChecksums(dex_files1) + "]" + in TEST_F()
1142 std::string context = in TEST_F()
1144 std::string expected_classpath_key = "PCL[" + CreateClassPathWithChecksums(dex_files1) + "]" + in TEST_F()
1157 std::string context = "PCL[" + GetTestDexFileName("Nested") + "]" + "{PCL[" + in TEST_F()
1160 std::string expected_classpath_key = "PCL[" + CreateClassPathWithChecksums(dex_files1) + "]" + in TEST_F()
1174 std::string context = "PCL[" + GetTestDexFileName("Nested") + "]" + "{PCL[" + in TEST_F()
1177 std::string expected_classpath_key = "PCL[" + CreateClassPathWithChecksums(dex_files1) + "]" + in TEST_F()
1191 std::string out_dir = GetScratchDir(); in TEST_F()
1192 const std::string base_oat_name = out_dir + "/base.oat"; in TEST_F()
1193 const std::string base_vdex_name = out_dir + "/base.vdex"; in TEST_F()
1194 const std::string unload_oat_name = out_dir + "/unload.oat"; in TEST_F()
1195 const std::string unload_vdex_name = out_dir + "/unload.vdex"; in TEST_F()
1196 const std::string no_unload_oat_name = out_dir + "/nounload.oat"; in TEST_F()
1197 const std::string no_unload_vdex_name = out_dir + "/nounload.vdex"; in TEST_F()
1198 std::string error_msg; in TEST_F()
1201 const std::string image_location = spaces[0]->GetImageLocation(); in TEST_F()
1249 std::string out_dir = GetScratchDir(); in TEST_F()
1250 const std::string base_oat_name = out_dir + "/base.oat"; in TEST_F()
1251 std::string error_msg; in TEST_F()
1272 std::string out_dir = GetScratchDir(); in TEST_F()
1273 const std::string base_oat_name = out_dir + "/base.oat"; in TEST_F()
1300 std::string out_dir = GetScratchDir(); in TEST_F()
1301 const std::string base_oat_name = out_dir + "/base.oat"; in TEST_F()
1313 std::string out_dir = GetScratchDir(); in TEST_F()
1314 const std::string base_oat_name = out_dir + "/base.oat"; in TEST_F()
1325 std::string out_dir = GetScratchDir(); in TEST_F()
1326 const std::string base_oat_name = out_dir + "/base.oat"; in TEST_F()
1327 std::string error_msg; in TEST_F()
1340 std::string out_dir = GetScratchDir(); in TEST_F()
1341 const std::string base_oat_name = out_dir + "/base.oat"; in TEST_F()
1342 std::string error_msg; in TEST_F()
1355 std::string dex_location = GetScratchDir() + "/Dex2OatStderrLoggerTest.jar"; in TEST_F()
1356 std::string odex_location = GetOdexDir() + "/Dex2OatStderrLoggerTest.odex"; in TEST_F()
1368 EXPECT_NE(std::string::npos, output_.find("dex2oat took")); in TEST_F()
1372 std::string dex_location = GetScratchDir() + "/Dex2OatCompilationReason.jar"; in TEST_F()
1373 std::string odex_location = GetOdexDir() + "/Dex2OatCompilationReason.odex"; in TEST_F()
1383 std::string error_msg; in TEST_F()
1396 std::string dex_location = GetScratchDir() + "/Dex2OatNoCompilationReason.jar"; in TEST_F()
1397 std::string odex_location = GetOdexDir() + "/Dex2OatNoCompilationReason.odex"; in TEST_F()
1403 std::string error_msg; in TEST_F()
1417 std::string error_msg; in TEST_F()
1418 const std::string out_dir = GetScratchDir(); in TEST_F()
1419 const std::string dex_location = dex->GetLocation(); in TEST_F()
1420 const std::string odex_location = out_dir + "/base.oat"; in TEST_F()
1421 const std::string vdex_location = out_dir + "/base.vdex"; in TEST_F()
1493 std::string line; in TEST_F()
1495 const std::string kFastVerifyString = "Fast Verify"; in TEST_F()
1497 found_fast_verify = found_fast_verify || line.find(kFastVerifyString) != std::string::npos; in TEST_F()
1527 const std::string& dex_location = invalid_dex.GetFilename(); in TEST_F()
1528 const std::string odex_location = GetOdexDir() + "/output.odex"; in TEST_F()
1529 std::string error_msg; in TEST_F()
1576 std::string error_msg; in TEST_F()
1599 const std::string out_dir = GetScratchDir(); in TEST_F()
1600 const std::string odex_location = out_dir + "/base.odex"; in TEST_F()
1610 std::string error_msg; in TEST_F()
1629 std::string zip_location = GetTestDexFileName("MainUncompressedAligned"); in TEST_F()
1631 std::vector<std::string> extra_args{ in TEST_F()
1635 std::string out_dir = GetScratchDir(); in TEST_F()
1636 const std::string base_oat_name = out_dir + "/base.oat"; in TEST_F()
1653 const std::string& dex_location = temp_dex.GetFilename(); in TEST_F()
1690 const std::string out_dir = GetScratchDir(); in TEST_F()
1691 const std::string odex_location = out_dir + "/base.odex"; in TEST_F()
1692 const std::string app_image_location = out_dir + "/base.art"; in TEST_F()
1704 std::string error_msg; in TEST_F()
1715 std::string error_msg; in TEST_F()
1716 std::string zip_location = GetTestDexFileName("Main"); in TEST_F()
1724 std::string entry_name = DexFileLoader::GetMultiDexClassesDexName(0); in TEST_F()
1729 const std::string& dex_location = dex_file.GetFilename(); in TEST_F()
1730 const std::string base_oat_name = GetScratchDir() + "/base.oat"; in TEST_F()
1736 std::vector<std::string> extra_args{ in TEST_F()
1751 std::string error_msg; in TEST_F()
1752 const std::string out_dir = GetScratchDir(); in TEST_F()
1753 const std::string dex_location = dex->GetLocation(); in TEST_F()
1754 const std::string odex_location = out_dir + "/base.oat"; in TEST_F()
1755 const std::string vdex_location = out_dir + "/base.vdex"; in TEST_F()
1779 const std::string& dex_location = temp_dex.GetFilename(); in TEST_F()
1788 if (accessor.GetDescriptor() == std::string("LStringLiterals$StartupClass;")) { in TEST_F()
1792 std::string method_name(dex->GetMethodName(dex->GetMethodId(method.GetIndex()))); in TEST_F()
1836 const std::string out_dir = GetScratchDir(); in TEST_F()
1837 const std::string odex_location = out_dir + "/base.odex"; in TEST_F()
1838 const std::string app_image_location = out_dir + "/base.art"; in TEST_F()
1850 std::string error_msg; in TEST_F()
1864 std::set<std::string> seen; in TEST_F()
1885 std::set<std::string> boot_image_strings; in TEST_F()
1886 std::set<std::string> app_image_strings; in TEST_F()
1908 const std::string out_dir = GetScratchDir(); in TEST_F()
1909 const std::string odex_location = out_dir + "/base.odex"; in TEST_F()
1910 const std::string valid_context = "PCL[" + dex_files[0]->GetLocation() + "]"; in TEST_F()
1911 const std::string stored_context = "PCL[/system/not_real_lib.jar]"; in TEST_F()
1913 std::string expected_stored_context = in TEST_F()
1946 void RunTest(const std::vector<std::string>& extra_args = {}) { in RunTest()
1947 std::string dex_location = GetScratchDir() + "/Dex2OatSwapTest.jar";
1948 std::string odex_location = GetOdexDir() + "/Dex2OatSwapTest.odex";
1956 std::string GetTestDexFileName() { return GetDexSrc1(); } in GetTestDexFileName()
1960 std::vector<std::string> argv; in TEST_F()
1979 std::string out_dir = GetScratchDir(); in TEST_F()
1980 const std::string base_oat_name = out_dir + "/base.oat"; in TEST_F()
1981 std::string error_msg; in TEST_F()
2001 std::string out_dir = GetScratchDir(); in TEST_F()
2002 const std::string base_oat_name = out_dir + "/base.oat"; in TEST_F()
2013 std::string error_msg; in TEST_F()
2032 std::string error_msg; in TEST_F()
2090 std::string error_msg; in TEST_F()