Lines Matching refs:std
92 ScratchFile::ScratchFile(const std::string& filename) : filename_(filename) { in ScratchFile()
105 *this = std::move(other); in ScratchFile()
110 std::swap(filename_, other.filename_); in operator =()
111 std::swap(file_, other.file_); in operator =()
157 std::string android_host_out; in SetUpAndroidRootEnvVars()
160 android_host_out = std::string(android_build_top_from_env) + "/out/host/linux-x86"; in SetUpAndroidRootEnvVars()
162 std::string argv; in SetUpAndroidRootEnvVars()
165 std::string cmdpath(argv.substr(0, argv.find('\0'))); in SetUpAndroidRootEnvVars()
166 std::filesystem::path path(cmdpath); in SetUpAndroidRootEnvVars()
169 path = std::filesystem::path(android_build_top_from_env).append(cmdpath); in SetUpAndroidRootEnvVars()
174 path.filename() != std::filesystem::path("linux-x86")) { in SetUpAndroidRootEnvVars()
178 if (path.filename() == std::filesystem::path("linux-x86")) { in SetUpAndroidRootEnvVars()
183 android_host_out = std::string(android_build_top_from_env) + "/out/host/darwin-x86"; in SetUpAndroidRootEnvVars()
206 std::string android_i18n_root = android_host_out_from_env; in SetUpAndroidRootEnvVars()
217 std::string android_art_root = android_host_out_from_env; in SetUpAndroidRootEnvVars()
228 std::string android_tzdata_root = android_host_out_from_env; in SetUpAndroidRootEnvVars()
237 void CommonArtTestImpl::SetUpAndroidDataDir(std::string& android_data) { in SetUpAndroidDataDir()
270 void CommonArtTestImpl::TearDownAndroidDataDir(const std::string& android_data, in TearDownAndroidDataDir()
281 std::string CommonArtTestImpl::GetAndroidToolsDir(const std::string& subdir1, in GetAndroidToolsDir()
282 const std::string& subdir2, in GetAndroidToolsDir()
283 const std::string& subdir3) { in GetAndroidToolsDir()
284 std::string root; in GetAndroidToolsDir()
296 std::string toolsdir = root + "/" + subdir1; in GetAndroidToolsDir()
297 std::string founddir; in GetAndroidToolsDir()
303 std::string format = subdir2 + "-%f"; in GetAndroidToolsDir()
305 if (std::sscanf(entry->d_name, format.c_str(), &version) == 1) { in GetAndroidToolsDir()
321 std::string CommonArtTestImpl::GetAndroidHostToolsDir() { in GetAndroidHostToolsDir()
327 std::string CommonArtTestImpl::GetCoreArtLocation() { in GetCoreArtLocation()
331 std::string CommonArtTestImpl::GetCoreOatLocation() { in GetCoreOatLocation()
335 std::unique_ptr<const DexFile> CommonArtTestImpl::LoadExpectSingleDexFile(const char* location) { in LoadExpectSingleDexFile()
336 std::vector<std::unique_ptr<const DexFile>> dex_files; in LoadExpectSingleDexFile()
337 std::string error_msg; in LoadExpectSingleDexFile()
347 return std::move(dex_files[0]); in LoadExpectSingleDexFile()
361 std::string filename(dirpath); in ClearDirectory()
390 static std::string GetDexFileName(const std::string& jar_prefix, bool host) { in GetDexFileName()
392 std::string path = GetAndroidRoot(); in GetDexFileName()
400 std::vector<std::string> CommonArtTestImpl::GetLibCoreModuleNames() const { in GetLibCoreModuleNames()
417 std::vector<std::string> CommonArtTestImpl::GetLibCoreDexFileNames( in GetLibCoreDexFileNames()
418 const std::vector<std::string>& modules) const { in GetLibCoreDexFileNames()
419 std::vector<std::string> result; in GetLibCoreDexFileNames()
421 for (const std::string& module : modules) { in GetLibCoreDexFileNames()
427 std::vector<std::string> CommonArtTestImpl::GetLibCoreDexFileNames() const { in GetLibCoreDexFileNames()
428 std::vector<std::string> modules = GetLibCoreModuleNames(); in GetLibCoreDexFileNames()
432 std::vector<std::string> CommonArtTestImpl::GetLibCoreDexLocations( in GetLibCoreDexLocations()
433 const std::vector<std::string>& modules) const { in GetLibCoreDexLocations()
434 std::vector<std::string> result = GetLibCoreDexFileNames(modules); in GetLibCoreDexLocations()
439 std::string prefix = host_dir; in GetLibCoreDexLocations()
444 for (std::string& location : result) { in GetLibCoreDexLocations()
453 std::vector<std::string> CommonArtTestImpl::GetLibCoreDexLocations() const { in GetLibCoreDexLocations()
454 std::vector<std::string> modules = GetLibCoreModuleNames(); in GetLibCoreDexLocations()
458 std::string CommonArtTestImpl::GetClassPathOption(const char* option, in GetClassPathOption()
459 const std::vector<std::string>& class_path) { in GetClassPathOption()
474 std::string CommonArtTestImpl::GetTestDexFileName(const char* name) const { in GetTestDexFileName()
476 std::string filename; in GetTestDexFileName()
488 std::vector<std::unique_ptr<const DexFile>> CommonArtTestImpl::OpenDexFiles(const char* filename) { in OpenDexFiles()
491 std::string error_msg; in OpenDexFiles()
493 std::vector<std::unique_ptr<const DexFile>> dex_files; in OpenDexFiles()
508 std::unique_ptr<const DexFile> CommonArtTestImpl::OpenDexFile(const char* filename) { in OpenDexFile()
509 std::vector<std::unique_ptr<const DexFile>> dex_files(OpenDexFiles(filename)); in OpenDexFile()
511 return std::move(dex_files[0]); in OpenDexFile()
514 std::vector<std::unique_ptr<const DexFile>> CommonArtTestImpl::OpenTestDexFiles( in OpenTestDexFiles()
519 std::unique_ptr<const DexFile> CommonArtTestImpl::OpenTestDexFile(const char* name) { in OpenTestDexFile()
523 std::string CommonArtTestImpl::GetCoreFileLocation(const char* suffix) { in GetCoreFileLocation()
526 std::string location; in GetCoreFileLocation()
528 std::string host_dir = GetAndroidRoot(); in GetCoreFileLocation()
537 std::string CommonArtTestImpl::CreateClassPath( in CreateClassPath()
538 const std::vector<std::unique_ptr<const DexFile>>& dex_files) { in CreateClassPath()
540 std::string classpath = dex_files[0]->GetLocation(); in CreateClassPath()
547 std::string CommonArtTestImpl::CreateClassPathWithChecksums( in CreateClassPathWithChecksums()
548 const std::vector<std::unique_ptr<const DexFile>>& dex_files) { in CreateClassPathWithChecksums()
550 std::string classpath = dex_files[0]->GetLocation() + "*" + in CreateClassPathWithChecksums()
551 std::to_string(dex_files[0]->GetLocationChecksum()); in CreateClassPathWithChecksums()
554 std::to_string(dex_files[i]->GetLocationChecksum()); in CreateClassPathWithChecksums()
560 const std::vector<std::string>& argv, in ForkAndExec()
567 std::vector<const char*> c_args; in ForkAndExec()
568 for (const std::string& str : argv) { in ForkAndExec()
631 const std::vector<std::string>& argv, const PostForkFn& post_fork, std::string* output) { in ForkAndExec()
633 *output += std::string(buf, len); in ForkAndExec()