Home
last modified time | relevance | path

Searched refs:path (Results 1 – 25 of 66) sorted by relevance

123

/test/app_compat/csuite/tools/script/
Dgenerate_module.py137 def _remove_empty_dirs(path): argument
138 for filename in os.listdir(path):
139 file_path = os.path.join(path, filename)
140 if os.path.isdir(file_path) and not os.listdir(file_path):
163 build_module_path = os.path.join(package_dir, _ANDROID_BP_FILE_NAME)
164 test_module_path = os.path.join(package_dir, _ANDROID_XML_FILE_NAME)
174 package_dir_path = os.path.join(root_dir, package_name)
188 def _file_path(path): argument
189 if os.path.isfile(path):
190 return path
[all …]
Dgenerate_module_test.py221 os.path.exists(os.path.join(root_dir, package_name1, 'Android.bp')))
223 os.path.exists(
224 os.path.join(root_dir, package_name1, 'AndroidTest.xml')))
226 os.path.exists(os.path.join(root_dir, package_name2, 'Android.bp')))
228 os.path.exists(
229 os.path.join(root_dir, package_name2, 'AndroidTest.xml')))
241 self.assertFalse(os.path.exists(package_dir))
/test/vts-testcase/kernel/ltp/testcase/tools/
Dltp_configs.py21 VTS_LTP_OUTPUT = os.path.join('DATA', 'nativetest', 'ltp')
27 TMP = os.path.join(LTPDIR, 'tmp')
29 TMPBASE = os.path.join(TMP, 'tmpbase')
31 LTPTMP = os.path.join(TMP, 'ltptemp')
33 TMPDIR = os.path.join(TMP, 'tmpdir')
/test/dittosuite/test/
Ddelete_file_test.cpp28 std::string path = absolute_path + file_name; member in DeleteFileTest
33 ASSERT_NE(open(path.c_str(), O_CREAT | O_CLOEXEC | O_RDWR, S_IRUSR | S_IWUSR), -1); in SetUp()
36 void TearDown() override { unlink(path.c_str()); } in TearDown()
44 ASSERT_EQ(access(path.c_str(), F_OK), -1); in TEST_F()
48 dittosuite::SharedVariables::Set(thread_ids, "input", path); in TEST_F()
53 ASSERT_EQ(access(path.c_str(), F_OK), -1); in TEST_F()
Dread_directory_test.cpp28 std::string path = absolute_path + directory_name; member in ReadDirectoryTest
29 std::vector<std::string> files{path + "/test1", path + "/test2", path + "/test3"};
34 ASSERT_NE(mkdir(path.c_str(), S_IRWXU), -1); in SetUp()
44 ASSERT_NE(rmdir(path.c_str()), -1); in TearDown()
Dopen_file_test.cpp25 std::string path = absolute_path + file_name; member in OpenFileTest
28 void TearDown() override { unlink(path.c_str()); } in TearDown()
37 ASSERT_EQ(access(path.c_str(), F_OK), 0); in TEST_P()
42 dittosuite::SharedVariables::Set(thread_ids, "input", path); in TEST_P()
48 ASSERT_EQ(access(path.c_str(), F_OK), 0); in TEST_P()
Dresize_file_test.cpp31 std::string path = absolute_path + file_name; member in ResizeFileTest
34 void TearDown() override { unlink(path.c_str()); } in TearDown()
48 ASSERT_EQ(access(path.c_str(), F_OK), 0); in TEST_P()
58 stat(path.c_str(), &sb); in TEST_P()
Dexample_test.cpp38 std::string path = base_path + "/" + entry->d_name; in __ditto_files_paths() local
39 std::cout << "Found: " << path << std::endl; in __ditto_files_paths()
43 ditto_paths->push_back(path); in __ditto_files_paths()
49 __ditto_files_paths(ditto_paths, path); in __ditto_files_paths()
/test/vts-testcase/vndk/
Dutils.py246 def Exists(self, path): argument
248 return self._Test("-e", path)
250 def IsDirectory(self, path): argument
252 return self._Test("-d", path)
254 def _Stat(self, fmt, path): argument
256 out, err, return_code = self.Execute("stat", "--format", fmt, path)
259 (fmt, path, out, err))
262 def IsExecutable(self, path): argument
264 return "x" in self._Stat("%A", path)
266 def FindFiles(self, path, name_pattern, *options): argument
[all …]
/test/app_compat/csuite/harness/src/main/java/com/android/csuite/core/
DAppCrawlTesterHostPreparer.java126 static void setSdkPath(TestInformation testInfo, Path path) { in setSdkPath() argument
127 testInfo.getBuildInfo().addBuildAttribute(SDK_PATH_KEY, path.toString()); in setSdkPath()
131 static void setCrawlerBinPath(TestInformation testInfo, Path path) { in setCrawlerBinPath() argument
132 testInfo.getBuildInfo().addBuildAttribute(CRAWLER_BIN_PATH_KEY, path.toString()); in setCrawlerBinPath()
136 static void setCredentialPath(TestInformation testInfo, Path path) { in setCredentialPath() argument
137 testInfo.getBuildInfo().addBuildAttribute(CREDENTIAL_PATH_KEY, path.toString()); in setCredentialPath()
189 private static void cleanUp(Path path) throws IOException { in cleanUp() argument
190 if (path == null || !Files.exists(path)) { in cleanUp()
194 MoreFiles.deleteRecursively(path); in cleanUp()
DModuleGenerator.java143 .filter(path -> path.toString().endsWith(MODULE_FILE_NAME_EXTENSION)) in deleteModuleFiles()
145 path -> { in deleteModuleFiles()
150 return Files.readString(path).contains(GENERATED_MODULE_NOTE); in deleteModuleFiles()
156 path -> { in deleteModuleFiles()
158 Files.delete(path); in deleteModuleFiles()
DAppCrawlTester.java302 files.filter(path -> path.getFileName().toString().toLowerCase().endsWith(".png")) in collectCrawlStepScreenshots()
304 path -> { in collectCrawlStepScreenshots()
310 + path.getFileName(), in collectCrawlStepScreenshots()
312 path.toFile()); in collectCrawlStepScreenshots()
340 path -> in createCrawlerRoboscriptSignal()
341 path.getFileName() in createCrawlerRoboscriptSignal()
493 path -> { in createUtpCrawlerRunCommand()
495 path.getFileName().toString().toLowerCase(); in createUtpCrawlerRunCommand()
498 cmd.add(path.toString()); in createUtpCrawlerRunCommand()
504 path.toString(), in createUtpCrawlerRunCommand()
[all …]
DTestUtils.java391 path -> in listApks()
392 path.getFileName() in listApks()
396 || path.getFileName() in listApks()
407 .filter(path -> path.getFileName().toString().endsWith(".apk")) in listApks()
415 if (apkFiles.stream().map(path -> path.getParent().toString()).distinct().count() != 1) { in listApks()
424 .filter(path -> path.getFileName().toString().equals("base.apk")) in listApks()
435 path -> in listApks()
436 path.getFileName().toString().endsWith(".obb") in listApks()
437 && path.getFileName().toString().startsWith("main")) in listApks()
DApkInstaller.java188 .filter(path -> path.toLowerCase().endsWith(".apk")) in createApkInstallCommand()
199 .filter(path -> path.toString().toLowerCase().endsWith(".obb")) in createObbInstallCommands()
201 path -> { in createObbInstallCommands()
203 "/sdcard/Android/obb/" + packageName + "/" + path.getFileName(); in createObbInstallCommands()
210 "adb", "-s", deviceSerial, "push", path.toString(), dest in createObbInstallCommands()
/test/vts-testcase/security/system_property/
Dvts_treble_sys_prop_test.py226 os.path.join(self._temp_dir,
328 with open(os.path.join(self._temp_dir, "product_property_contexts"),
404 with open(os.path.join(self._temp_dir, "plat_property_contexts"),
413 resource_name = os.path.basename(self._PUBLIC_PROPERTY_CONTEXTS_FILE_PATH)
414 package_name = os.path.dirname(
415 self._PUBLIC_PROPERTY_CONTEXTS_FILE_PATH).replace(os.path.sep, '.')
429 def AssertPermissionsAndExistence(self, path, check_permission): argument
437 self.assertTrue(self.dut.Exists(path), "%s: File does not exist." % path)
439 permission = self.GetPermission(path)
441 "%s: File has invalid permissions (%s)" % (path, permission))
[all …]
/test/app_compat/csuite/harness/src/test/java/com/android/csuite/core/
DAppCrawlTesterHostPreparerTest.java56 Path path = Path.of("some"); in getSdkPath_wasSet_returnsPath() local
57 AppCrawlTesterHostPreparer.setSdkPath(mTestInfo, path); in getSdkPath_wasSet_returnsPath()
61 assertThat(result).isEqualTo(path.toString()); in getSdkPath_wasSet_returnsPath()
73 Path path = Path.of("some"); in getCrawlerBinPath_wasSet_returnsPath() local
74 AppCrawlTesterHostPreparer.setCrawlerBinPath(mTestInfo, path); in getCrawlerBinPath_wasSet_returnsPath()
78 assertThat(result).isEqualTo(path.toString()); in getCrawlerBinPath_wasSet_returnsPath()
90 Path path = Path.of("some"); in getCredentialPath_wasSet_returnsPath() local
91 AppCrawlTesterHostPreparer.setCredentialPath(mTestInfo, path); in getCredentialPath_wasSet_returnsPath()
95 assertThat(result).isEqualTo(path.toString()); in getCredentialPath_wasSet_returnsPath()
DModuleTemplateTest.java237 ConfigurationBuilder setExtraTemplateContent(String path, String content) { in setExtraTemplateContent() argument
238 mExtraTemplateContents.put(path, content); in setExtraTemplateContent()
242 ConfigurationBuilder addExtraTemplatePath(String path) { in addExtraTemplatePath() argument
243 mExtraTemplatePaths.add(path); in addExtraTemplatePath()
256 path -> { in build()
257 if (mExtraTemplateContents.containsKey(path)) { in build()
258 return mExtraTemplateContents.get(path); in build()
/test/vts-testcase/vndk/dependency/
Dvts_vndk_dependency_test.py90 self.name = os.path.basename(target_path)
91 self.target_dir = os.path.dirname(target_path)
98 path = runpath.replace("${LIB}", lib_dir_name)
99 path = path.replace("$LIB", lib_dir_name)
100 path = path.replace("${ORIGIN}", self.target_dir)
101 path = path.replace("$ORIGIN", self.target_dir)
102 self.runpaths.append(path)
216 yield os.path.join(root_dir, file_name)
261 if any(target_path.startswith(app_dir + os.path.sep) for
263 custom_link_paths.append(os.path.dirname(target_path))
[all …]
/test/dittosuite/src/
Dbinder_request.cpp92 int ParseAshmemWithPath(std::string path, android::Parcel& parcel) { in ParseAshmemWithPath() argument
93 int fd = open(path.c_str(), O_RDONLY); in ParseAshmemWithPath()
98 LOGF("Could not open " + path); in ParseAshmemWithPath()
102 LOGF("Could not stat " + path); in ParseAshmemWithPath()
107 LOGF("ashmem_create_region failed " + path); in ParseAshmemWithPath()
112 LOGF("mmap failed " + path); in ParseAshmemWithPath()
116 LOGF("read failed " + path); in ParseAshmemWithPath()
124 LOGF("writeFileDescriptor failed " + path); in ParseAshmemWithPath()
/test/vts/vndk_utils/library/vtable/
Dvtable_dumper_test.py54 dir_path = os.path.dirname(os.path.realpath(__file__))
55 self.elf_file_path = os.path.join(dir_path, 'testing', 'libtest.so')
/test/vts-testcase/vndk/golden/
Dvndk_data.py62 _GOLDEN_DIR = os.path.join("vts", "testcases", "vndk", "golden")
130 for path in dump_resource.zip_file.namelist():
132 if path.startswith(dump_dir) and path.endswith(ext):
133 lib_name = path[len(dump_dir):-len(ext)]
134 dump_paths[lib_name] = path
/test/cts-root/hostsidetests/rollback/src/com/android/cts_root/rollback/host/
DRollbackManagerHostTest.java518 private void assertDirectoryIsEmpty(String path) { in assertDirectoryIsEmpty() argument
520 IFileEntry file = getDevice().getFileEntry(path); in assertDirectoryIsEmpty()
521 assertWithMessage("Not a directory: " + path).that(file.isDirectory()).isTrue(); in assertDirectoryIsEmpty()
522 assertWithMessage("Directory not empty: " + path) in assertDirectoryIsEmpty()
525 fail("Can't access directory: " + path); in assertDirectoryIsEmpty()
529 private void assertFileContents(String expectedContents, String path) throws Exception { in assertFileContents() argument
530 String actualContents = getDevice().pullFileContents(path); in assertFileContents()
531 assertWithMessage("Failed to retrieve file=%s", path).that(actualContents).isNotNull(); in assertFileContents()
532 assertWithMessage("Mismatched file contents, path=%s", path) in assertFileContents()
536 private void assertFileNotExists(String path) throws Exception { in assertFileNotExists() argument
[all …]
/test/vts-testcase/kernel/gki/
Dramdisk_utils.cpp81 auto decompress_res = android::Lz4DecompressLegacy((*raw_ramdisk_file)->path, in ExtractRamdiskToDirectory()
82 decompressed.path); in ExtractRamdiskToDirectory()
85 return android::CpioExtract(decompressed.path); in ExtractRamdiskToDirectory()
/test/suite_harness/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/
DDeviceInteractionHelperInstaller.java141 String path = apkFile.getPath(); in checkApkFile() local
144 "Helper " + path + " does not exist or is unreadable.", in checkApkFile()
150 "Unable to parse helper apk " + path, device.getDeviceDescriptor()); in checkApkFile()
155 "Unable to parse helper apk " + path, device.getDeviceDescriptor()); in checkApkFile()
161 path, apkPackage, expectedPackage), in checkApkFile()
/test/app_compat/csuite/integration_tests/
Dcsuite_test_utils.py105 if os.path.isdir(jdk17_path):
147 open(os.path.join(apk_dir, apk), 'wb') as file,
223 def _add_owner_exec_permission(path: pathlib.Path):
224 path.chmod(path.stat().st_mode | stat.S_IEXEC)

123