/development/gsi/gsi_util/gsi_util/utils/tests/ |
D | file_utils_unittest.py | 19 import os 32 self.assertTrue(os.path.exists(f)) 33 self.assertEqual(0, os.path.getsize(f)) 34 self.assertRegexpMatches(os.path.basename(f), r'prefix.+suffix') 35 self.assertEqual(tempfile.gettempdir(), os.path.dirname(f)) 36 self.assertFalse(os.path.exists(f)) 40 self.assertTrue(os.path.exists(f)) 41 os.unlink(f) 42 self.assertFalse(os.path.exists(f)) 43 self.assertFalse(os.path.exists(f)) [all …]
|
/development/testrunner/ |
D | android_build.py | 21 import os 43 root_path = os.getenv("ANDROID_BUILD_TOP") 62 host_out_path = os.getenv("ANDROID_HOST_OUT") 79 root_path = os.getenv("OUT_DIR") 81 root_path = os.path.join(GetTop(), "out") 99 path = os.path.join(GetHostOutDir(), "bin") 100 if not os.path.exists(path): 120 path = os.getenv("ANDROID_PRODUCT_OUT") 140 path = os.path.join(GetProductOut(), "data", "nativetest") 141 if not os.path.exists(path): [all …]
|
/development/vndk/tools/definition-tool/tools/ |
D | update_dataset_auto.py | 7 import os 12 UPDATE_DATASET = os.path.abspath(os.path.join( 15 LIST_VNDK_MODULE = os.path.abspath(os.path.join( 20 dirname, basename = os.path.split(path) 22 os.close(tmp_fd) 33 os.rename(tmp_path, path) 37 dirname, basename = os.path.split(path) 39 os.close(tmp_fd) 46 cmd.append(os.path.join(build_top, 'Android.bp')) 51 os.rename(tmp_path, path) [all …]
|
/development/scripts/ |
D | symbol.py | 24 import os 31 ANDROID_BUILD_TOP = os.environ.get("ANDROID_BUILD_TOP", ".") 34 saveddir = os.getcwd() 35 os.chdir(ANDROID_BUILD_TOP) 44 os.chdir(saveddir) 125 os._exit(0) 138 return os.path.join(toolchain, tool) 149 if not os.path.exists(llvm_binutils_dir): 271 if not os.path.exists(symbols): 273 if not os.path.exists(symbols): [all …]
|
/development/vndk/tools/header-checker/tests/ |
D | gen_all.py | 3 import os 7 import_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) 8 import_path = os.path.abspath(os.path.join(import_path, 'utils')) 27 for base, dirnames, filenames in os.walk(INPUT_DIR): 33 input_path = os.path.join(base, filename) 35 output_path = os.path.join(EXPECTED_DIR, input_rel_path) 38 os.makedirs(os.path.dirname(output_path), exist_ok=True)
|
/development/testrunner/coverage/ |
D | coverage.py | 23 import os 43 _EMMA_JAR = os.path.join("external", "emma", "lib", "emma.jar") 48 _CORE_TARGET_PATH = os.path.join("development", "testrunner", 52 _VENDOR_TARGET_PATH = os.path.join("vendor", "*", "tests", "testinfo", 56 _TARGET_INTERMEDIATES_BASE_PATH = os.path.join("target", "common", 62 self._output_root_path = os.path.join(self._out_path, 64 self._emma_jar_path = os.path.join(self._root_path, self._EMMA_JAR) 93 output_path = os.path.join(self._out_path, 100 coverage_local_path = os.path.join(output_path, 104 report_path = os.path.join(output_path, [all …]
|
/development/vndk/tools/definition-tool/tests/ |
D | test_elfdump.py | 5 import os 15 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) 16 VNDK_DEF_TOOL = os.path.join(SCRIPT_DIR, '..', 'vndk_definition_tool.py') 18 INPUT_DIR = os.path.join(SCRIPT_DIR, 'testdata', 'test_elfdump', 'input') 19 EXPECTED_DIR = os.path.join(SCRIPT_DIR, 'testdata', 'test_elfdump', 'expected') 52 cls.expected_dir = os.path.join(EXPECTED_DIR, target_name) 53 cls.test_dir = os.path.join(cls.test_dir_base, target_name) 58 src_file = os.path.join(INPUT_DIR, 'main.c') 59 obj_file = os.path.join(cls.test_dir, 'main.o') 63 out_file = os.path.join(cls.test_dir, 'main.out') [all …]
|
D | test_vndk_lib_dir.py | 3 import os 12 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) 139 input_dir = os.path.join( 143 [os.path.join(input_dir, 'system')], 144 [os.path.join(input_dir, 'vendor')]) 150 input_dir = os.path.join( 154 [os.path.join(input_dir, 'system')], 155 [os.path.join(input_dir, 'vendor')]) 161 input_dir = os.path.join( 166 [os.path.join(input_dir, 'system')], [all …]
|
D | ndk_toolchain.py | 6 import os 13 ndk_dir = os.getenv('NDK') 26 if not os.path.exists(ndk_dir): 36 for name in os.listdir(os.path.join(ndk_dir, 'platforms')): 56 return os.path.join(ndk_dir, 'toolchains', arch, 'prebuilt', host) 60 return os.path.join(ndk_dir, 'toolchains', 'llvm', 'prebuilt', host) 64 return os.path.join(ndk_dir, 'platforms', api, *subdirs) 83 if os.path.exists(path): 88 ld_exeutable = os.path.join( 100 clang = os.path.join(self.clang_dir, 'bin', 'clang') [all …]
|
/development/build/tools/ |
D | mk_sources_zip.py | 19 import os 119 if not os.path.isfile(p.PROPS): 121 if not os.path.isdir(p.SRC): 133 if not os.path.exists(srcdir): 137 for filename in os.listdir(srcdir): 138 filepath = os.path.join(srcdir, filename) 139 if filename.endswith(".java") and os.path.isfile(filepath): 155 pkg = pkg.replace(".", os.path.sep) # e.g. android.view => android/view 160 elif os.path.isdir(filepath): 188 arc_path = os.path.join(TOP_FOLDER, dest_pkg, os.path.basename(filepath)) [all …]
|
/development/vndk/tools/elfcheck/elfcheck/ |
D | android.py | 19 import os.path 25 path = os.path.dirname(os.path.abspath(path)) 28 if os.path.exists(os.path.join(path, '.repo', 'manifest.xml')): 31 path = os.path.dirname(path)
|
/development/vndk/tools/sourcedr/files/ |
D | list_app_shared_uid.py | 24 import os 58 product_out = os.path.abspath(product_out) 64 partition_dir = os.path.join(product_out, partition) 65 for base, _, filenames in os.walk(partition_dir): 67 name, ext = os.path.splitext(filename) 69 return os.path.join(base, filename)[prefix_len:] 79 apps_dir = os.path.join(product_out, 'obj', 'APPS') 81 for app_dir_name in os.listdir(apps_dir): 83 app_dir = os.path.join(apps_dir, app_dir_name) 85 apk_file = os.path.join(app_dir, 'package.apk') [all …]
|
/development/testrunner/test_defs/ |
D | native_test.py | 21 import os 55 build_path = os.path.join(android_build.GetTop(), self.GetBuildPath()) 56 os.path.walk(build_path, self._CollectTestSources, source_list) 85 full_path = os.path.join(os.sep, "data", "nativetest", f) 118 (name, ext) = os.path.splitext(f) 122 test_list.append(str(os.path.join(dirname, f))) 139 binary = os.path.basename(f) 140 binary = os.path.splitext(binary)[0] 143 binary = os.path.relpath(os.path.abspath(found), 144 os.path.abspath(path)) [all …]
|
/development/tools/repo_diff/ |
D | repo_diff_android.py | 14 import os 27 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) 28 DEFAULT_EXCLUSIONS_FILE = os.path.join(SCRIPT_DIR, "android_exclusions.txt") 73 cwd=os.path.dirname(workspace), shell=True) 123 path = os.path.join(workspace, "build", "core", "build_id.mk") 131 if not os.path.exists(workspace): 132 os.makedirs(workspace) 134 manifest_path = os.path.join(workspace, ".repo", "manifests") 152 workspace = os.path.abspath(DOWNSTREAM_WORKSPACE) 153 upstream_workspace = os.path.abspath(UPSTREAM_WORKSPACE) [all …]
|
/development/vndk/snapshot/ |
D | utils.py | 22 import os 32 COMMON_BP_PATH = os.path.join(COMMON_DIR_PATH, 'Android.bp') 37 NOTICE_FILES_DIR_PATH = os.path.join(COMMON_DIR_PATH, NOTICE_FILES_DIR_NAME) 76 ANDROID_BUILD_TOP = os.getenv('ANDROID_BUILD_TOP') 85 return os.path.realpath(os.path.join(root, *args)) 89 return os.path.realpath(os.getenv(env_var, default)) 109 basename = os.path.basename(file) 110 if os.path.isdir(file) and basename != COMMON_DIR_NAME: 147 for root, _, files in os.walk(path): 150 abspath = os.path.abspath(os.path.join(root, file_name)) [all …]
|
D | update.py | 22 import os 42 branch=branch_name, dir=os.getcwd())) 50 if os.path.isfile(file): 51 os.unlink(file) 52 elif os.path.isdir(file): 77 os.chdir(temp_artifact_dir) 88 os.chdir(install_dir) 93 artifacts = glob.glob(os.path.join(artifact_dir, artifact_pattern)) 105 os.makedirs(common_notices_dir) 107 notices_dir_per_arch = os.path.join(arch, utils.NOTICE_FILES_DIR_NAME) [all …]
|
D | gen_buildfiles.py | 22 import os 103 self._root_bpfile = os.path.join(install_dir, utils.ROOT_BP_PATH) 104 self._common_bpfile = os.path.join(install_dir, utils.COMMON_BP_PATH) 106 os.path.basename(self._etc_paths['llndk.libraries.txt'])) 108 os.path.basename(self._etc_paths['vndkcore.libraries.txt'])) 110 os.path.basename(self._etc_paths['vndksp.libraries.txt'])) 112 os.path.basename(self._etc_paths['vndkprivate.libraries.txt'])) 114 os.path.basename(self._etc_paths['vndkproduct.libraries.txt'])) 122 etc_pattern = '{}*'.format(os.path.splitext(etc_module)[0]) 124 os.path.join(self._install_dir, utils.CONFIG_DIR_PATH_PATTERN, [all …]
|
/development/vndk/tools/ |
D | system_image_diff.py | 7 import os 33 system_path = os.path.normpath(os.path.join(out_path, 'system')) 34 system_path_dirs = system_path.split(os.sep) 36 return os.path.join(*system_path_dirs[out_index:]) 42 system_prefix = os.path.join(path, 'system') 46 for root, dirs, files in os.walk(system_prefix, topdown=True): 49 if not os.path.islink(os.path.join(root, file)): 50 system_files.append(os.path.join(root[system_prefix_len:], file)) 62 with open(os.path.join(path, 'module-info.json')) as module_info_json: 89 system_prefix = os.path.join(path, 'system') [all …]
|
/development/python-packages/adb/ |
D | test.py | 16 import os 24 self.android_serial = os.getenv('ANDROID_SERIAL') 25 if 'ANDROID_SERIAL' in os.environ: 26 del os.environ['ANDROID_SERIAL'] 30 os.environ['ANDROID_SERIAL'] = self.android_serial 32 if 'ANDROID_SERIAL' in os.environ: 33 del os.environ['ANDROID_SERIAL'] 44 os.environ['ANDROID_SERIAL'] = 'foo' 51 os.environ['ANDROID_SERIAL'] = 'bar' 60 os.environ['ANDROID_SERIAL'] = 'baz'
|
/development/vndk/tools/sourcedr/blueprint/tests/ |
D | test_module_path.py | 22 import os 52 test_dir = os.path.join( 53 os.path.dirname(__file__), 'testdata', 'example') 54 test_root_file = os.path.join(test_dir, SUBNAME) 61 self.assertEqual(os.path.join(test_dir, 'foo', SUBNAME), 63 self.assertEqual(os.path.join(test_dir, 'bar', SUBNAME),
|
/development/gsi/gsi_util/gsi_util/utils/ |
D | cmd_utils.py | 19 import os 28 _LOCAL_BIN_PATH = os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), 38 local_prog = os.path.join(_LOCAL_BIN_PATH, prog) 39 if os.path.isfile(local_prog) and os.access(local_prog, os.X_OK): 74 if sudo and os.getuid() != 0:
|
D | file_utils.py | 18 import os 38 os.close(fd) 43 if os.path.exists(path): 44 os.unlink(path)
|
/development/gsi/gsi_util/ |
D | build.py | 21 import os 52 if not os.environ.get('ANDROID_BUILD_TOP'): 58 abspath = os.path.abspath(prog) 59 dirname = os.path.dirname(abspath) 60 os.chdir(dirname) 66 build_top = os.environ['ANDROID_BUILD_TOP'] 71 dir_path = os.path.dirname(dest) 74 os.makedirs(dir_path) 84 host_out = os.environ['ANDROID_HOST_OUT'] 89 full_src = os.path.join(host_out, item.src)
|
/development/gsi/repack_super_image/ |
D | repack_super_image.py | 20 import os 37 abs_path = os.path.abspath(path) 38 if not os.path.exists(abs_path): 57 for root_dir, dir_names, file_names in os.walk( 58 os.path.join(output_dir, BIN_DIR_NAME)): 60 file_path = os.path.join(root_dir, file_name) 61 file_stat = os.stat(file_path) 62 os.chmod(file_path, file_stat.st_mode | permissions) 167 if os.path.isdir(args.ota_tools): 181 simg2img_path = os.path.join(ota_tools_dir, BIN_DIR_NAME, "simg2img") [all …]
|
/development/vndk/tools/header-checker/utils/ |
D | utils.py | 4 import os 13 SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) 16 AOSP_DIR = os.environ['ANDROID_BUILD_TOP'] 23 os.path.join(AOSP_DIR, 'bionic', 'libc', 'include'), 24 os.path.join(AOSP_DIR, 'external', 'libcxx', 'include'), 25 os.path.join(AOSP_DIR, 'prebuilts', 'clang-tools', 'linux-x86', 89 reference_dump_path = os.path.join( 90 reference_dump_dir, os.path.basename(lib_path)) 93 os.makedirs(os.path.dirname(reference_dump_path), exist_ok=True) 109 input_ext = os.path.splitext(input_path)[1] [all …]
|