Home
last modified time | relevance | path

Searched refs:os (Results 1 – 25 of 387) sorted by relevance

12345678910>>...16

/tools/treble/build/sandbox/
Doverlay.py26 import os
69 elif path.startswith(bind_destination + os.sep):
70 relative_path = os.path.relpath(path, bind_destination)
71 path_in_source = os.path.join(bind_mount.source_dir, relative_path)
72 if os.path.exists(path_in_source) and os.listdir(path_in_source):
103 for current_dir_origin, subdirs, files in os.walk(overlay_dir):
109 current_dir_relative = os.path.relpath(current_dir_origin, overlay_dir)
110 current_dir_destination = os.path.normpath(
111 os.path.join(destination_dir, current_dir_relative))
126 current_dir_ancestor = os.path.dirname(current_dir_ancestor)
[all …]
Dnsjail.py25 import os
66 if not os.path.exists(rw_whitelist_config):
86 source_dir=os.getcwd(),
182 source_dir=os.getcwd(),
227 script_dir = os.path.dirname(os.path.abspath(__file__))
228 config_file = os.path.join(script_dir, 'nsjail.cfg')
232 out_dir = os.path.abspath(out_dir)
234 dist_dir = os.path.abspath(dist_dir)
236 meta_root_dir = os.path.abspath(meta_root_dir)
238 source_dir = os.path.abspath(source_dir)
[all …]
/tools/acloud/create/
Dgoldfish_local_image_local_instance.py41 import os
108 image_path = os.path.join(image_dir, partition_name + ".img")
109 if not os.path.isfile(image_path):
139 image_path = os.path.join(image_dir, partition_name + ".img")
140 if not os.path.isfile(image_path):
172 emulator_path = os.path.abspath(emulator_path)
174 image_dir = os.path.abspath(avd_spec.local_image_dir)
176 if not (os.path.isfile(os.path.join(image_dir, _SYSTEM_IMAGE_NAME)) or
177 os.path.isfile(os.path.join(image_dir,
199 os.makedirs(instance_dir)
[all …]
Dgoldfish_local_image_local_instance_test.py16 import os
40 self._image_dir = os.path.join(self._temp_dir, "images")
41 self._tool_dir = os.path.join(self._temp_dir, "tool")
42 self._instance_dir = os.path.join(self._temp_dir, "instance")
48 os.mkdir(self._image_dir)
49 os.mkdir(self._tool_dir)
52 self._emulator_path = os.path.join(self._tool_dir, "emulator",
61 parent_dir = os.path.dirname(path)
62 if not os.path.exists(parent_dir):
63 os.makedirs(parent_dir)
[all …]
Dremote_image_local_instance_test.py18 import os
63 self.Patch(os.path, "exists", return_value=True)
74 self.Patch(os.path, "exists", return_value=False)
75 self.Patch(os, "makedirs")
94 self.Patch(os.path, "exists", return_value=True)
95 self.Patch(os, "makedirs")
98 self.Patch(os, "statvfs", return_value=namedtuple(
106 self.Patch(os, "statvfs", return_value=namedtuple(
115 self.Patch(os, "statvfs", side_effect=[
128 self.Patch(os.path, "exists", return_value=False)
[all …]
/tools/acloud/
Dsetup.py24 import os
30 ACLOUD_DIR = os.path.realpath(os.path.dirname(__file__))
39 if "PROTOC" in os.environ and os.path.exists(os.environ["PROTOC"]):
40 PROTOC = os.environ["PROTOC"]
58 if not os.path.exists(output) or (
59 os.path.exists(source) and
60 os.path.getmtime(source) > os.path.getmtime(output)):
63 if not os.path.exists(source):
80 GenerateProto(os.path.join(ACLOUD_DIR, "internal/proto/user_config.proto"))
81 GenerateProto(os.path.join(ACLOUD_DIR, "internal/proto/internal_config.proto"))
[all …]
/tools/asuite/aidegen/lib/
Dcommon_util.py26 import os
129 elif os.path.isabs(target):
131 rel_path = os.path.relpath(abs_path, get_android_root_dir())
136 rel_path = paths[0].strip(os.sep)
137 abs_path = os.path.join(get_android_root_dir(), rel_path)
140 or os.path.isdir(os.path.join(get_android_root_dir(), target))):
141 rel_path = target.strip(os.sep)
142 abs_path = os.path.join(get_android_root_dir(), rel_path)
145 abs_path = os.path.abspath(os.path.join(os.getcwd(), target))
146 rel_path = os.path.relpath(abs_path, get_android_root_dir())
[all …]
Dproject_file_gen.py25 import os
60 _GITIGNORE_ABS_PATH = os.path.join(common_util.get_android_root_dir(),
64 _CODE_STYLE_SRC_PATH = os.path.join(common_util.get_android_root_dir(),
130 idea_dir = os.path.join(target_path, _IDEA_FOLDER)
131 copyright_dir = os.path.join(idea_dir, _COPYRIGHT_FOLDER)
132 code_style_dir = os.path.join(idea_dir, _CODE_STYLE_FOLDER)
134 os.path.join(idea_dir, _COMPILE_XML), templates.XML_COMPILER)
136 os.path.join(idea_dir, _MISC_XML), templates.XML_MISC)
138 os.path.join(copyright_dir, _APACHE_2_XML), templates.XML_APACHE_2)
140 os.path.join(copyright_dir, _PROFILES_SETTINGS_XML),
[all …]
Dconfig.py37 import os
57 _CONFIG_DIR = os.path.join(
58 os.path.expanduser('~'), '.config', 'asuite', 'aidegen')
59 _CONFIG_FILE_PATH = os.path.join(_CONFIG_DIR, _DEFAULT_CONFIG_FILE)
65 _ENABLE_DEBUG_DIR = os.path.join(_CONFIG_DIR, _ENABLE_DEBUG_CONFIG_DIR)
68 DEBUG_ENABLED_FILE_PATH = os.path.join(_ENABLE_DEBUG_DIR,
108 real_version = os.path.realpath(preferred_version)
130 if os.path.exists(self._CONFIG_FILE_PATH):
155 if not os.path.exists(self._CONFIG_DIR):
156 os.makedirs(self._CONFIG_DIR)
[all …]
Dide_common_util.py25 import os
84 for root, _, files in os.walk(top):
88 exe_file = os.path.join(root, file_)
89 if os.access(exe_file, os.X_OK):
122 if os.path.basename(input_path).startswith(ide_file_name):
176 if not os.path.isfile(project_path):
177 return os.path.isdir(project_path) and os.path.isdir(
178 os.path.join(project_path, _IDEA_FOLDER))
180 _, ext = os.path.splitext(os.path.basename(project_path))
182 path = os.path.dirname(project_path)
[all …]
Dide_util.py35 import os
79 LINUX_JDK_PATH = os.path.join(common_util.get_android_root_dir(),
83 LINUX_ANDROID_SDK_PATH = os.path.join(os.getenv('HOME'), 'Android/Sdk')
84 MAC_JDK_PATH = os.path.join(common_util.get_android_root_dir(),
88 MAC_ANDROID_SDK_PATH = os.path.join(os.getenv('HOME'), 'Library/Android/sdk')
230 jdk_file = os.path.join(_config_path, self._IDE_JDK_TABLE_PATH)
239 intellij_config_dir = os.path.join(_config_path, self._CONFIG_DIR)
254 file_type_path = os.path.join(_config_path, self._IDE_FILE_TYPE_PATH)
255 if not os.path.isfile(file_type_path):
338 return [os.path.join(f, self._bin_file_name) for f in self._bin_folders]
[all …]
/tools/test/connectivity/acts/framework/acts/libs/proto/
Dproto_utils.py15 import os
29 if 'PROTOC' in os.environ and os.path.exists(os.environ['PROTOC']):
30 protoc = os.environ['PROTOC']
43 if not os.path.exists(proto_path):
47 if not os.path.exists(output_dir):
48 os.makedirs(output_dir)
49 elif not os.path.isdir(output_dir):
53 input_dir = os.path.dirname(proto_path)
54 output_filename = os.path.basename(proto_path).replace('.proto', '_pb2.py')
55 output_path = os.path.join(output_dir, output_filename)
[all …]
/tools/doc_generation/
Dswitcher4.py24 import os
44 java_ref_root = os.getcwd()
45 kotlin_ref_root = os.path.join(java_ref_root, "kotlin")
46 root = os.path.split(java_ref_root)[1]
67 fn = os.path.split(doc)
92 os.system(slug1)
95 os.system(page_path_slug)
105 java_source_abs_path = os.path.join(java_ref_root, stem)
106 kotlin_source_abs_path = os.path.join(kotlin_ref_root, stem)
122 for root, dirs, files in os.walk(java_source_abs_path):
[all …]
/tools/asuite/atest/
Dasuite_metrics.py19 import os
29 _META_FILE = os.path.join(os.path.expanduser('~'),
72 if os.path.isfile(_META_FILE):
80 dir_path = os.path.dirname(_META_FILE)
81 if os.path.isfile(dir_path):
82 os.remove(dir_path)
84 os.makedirs(dir_path)
86 if not os.path.isdir(dir_path):
95 old_file = os.path.join(os.environ[_ANDROID_BUILD_TOP],
98 if os.path.isfile(old_file):
[all …]
Dtest_mapping.py20 import os
111 path = os.path.realpath(os.path.join(
112 os.path.dirname(self.test_mapping_file), self.path))
113 if os.path.exists(path):
115 root_dir = os.environ.get(constants.ANDROID_BUILD_TOP, os.sep)
116 path = os.path.realpath(os.path.join(root_dir, self.path))
117 if os.path.exists(path):
141 test_mapping_dir = os.path.dirname(test_mapping_file)
146 os.path.relpath(filepath, test_mapping_dir)
148 os.path.join(test_mapping_dir, '*'))
Dconstants_default.py21 import os
208 INDEX_DIR = os.path.join(os.getenv(ANDROID_HOST_OUT, ''), 'indexes')
209 LOCATE_CACHE = os.path.join(INDEX_DIR, 'mlocate.db')
210 INT_INDEX = os.path.join(INDEX_DIR, 'integration.idx')
211 CLASS_INDEX = os.path.join(INDEX_DIR, 'classes.idx')
212 CC_CLASS_INDEX = os.path.join(INDEX_DIR, 'cc_classes.idx')
213 PACKAGE_INDEX = os.path.join(INDEX_DIR, 'packages.idx')
214 QCLASS_INDEX = os.path.join(INDEX_DIR, 'fqcn.idx')
215 MODULE_INDEX = os.path.join(INDEX_DIR, 'modules.idx')
216 VERSION_FILE = os.path.join(os.path.dirname(__file__), 'VERSION')
[all …]
/tools/test/connectivity/tools/
Dproto_check.py19 import os
44 tmp_proto_gen_file = os.path.join(tmp_dir, '%s.py' % module_name)
60 gen_filename = os.path.basename(proto_file).replace('.proto', '_pb2.py')
64 if (os.path.basename(path) == gen_filename
65 and path.startswith(os.path.dirname(proto_file))):
71 for root, _, filenames in os.walk(os.path.dirname(proto_file)):
74 gen_file = os.path.join(root, filename)
86 protoc, '-I=%s' % os.path.dirname(proto_file),
87 '--python_out=%s' % os.path.dirname(gen_file), proto_file])
102 if COMMIT_ID_ENV_KEY not in os.environ:
[all …]
/tools/tradefederation/core/atest/
Dasuite_metrics.py19 import os
35 _META_FILE = os.path.join(os.path.expanduser('~'),
78 if os.path.isfile(_META_FILE):
86 dir_path = os.path.dirname(_META_FILE)
87 if os.path.isfile(dir_path):
88 os.remove(dir_path)
90 os.makedirs(dir_path)
92 if not os.path.isdir(dir_path):
101 old_file = os.path.join(os.environ[_ANDROID_BUILD_TOP],
104 if os.path.isfile(old_file):
[all …]
Dtest_mapping.py22 import os
113 path = os.path.realpath(os.path.join(
114 os.path.dirname(self.test_mapping_file), self.path))
115 if os.path.exists(path):
117 root_dir = os.environ.get(constants.ANDROID_BUILD_TOP, os.sep)
118 path = os.path.realpath(os.path.join(root_dir, self.path))
119 if os.path.exists(path):
143 test_mapping_dir = os.path.dirname(test_mapping_file)
148 os.path.relpath(filepath, test_mapping_dir)
150 os.path.join(test_mapping_dir, '*'))
Dconstants_default.py19 import os
205 INDEX_DIR = os.path.join(os.getenv(ANDROID_HOST_OUT, ''), 'indexes')
206 LOCATE_CACHE = os.path.join(INDEX_DIR, 'mlocate.db')
207 INT_INDEX = os.path.join(INDEX_DIR, 'integration.idx')
208 CLASS_INDEX = os.path.join(INDEX_DIR, 'classes.idx')
209 CC_CLASS_INDEX = os.path.join(INDEX_DIR, 'cc_classes.idx')
210 PACKAGE_INDEX = os.path.join(INDEX_DIR, 'packages.idx')
211 QCLASS_INDEX = os.path.join(INDEX_DIR, 'fqcn.idx')
212 MODULE_INDEX = os.path.join(INDEX_DIR, 'modules.idx')
213 VERSION_FILE = os.path.join(os.path.dirname(__file__), 'VERSION')
[all …]
/tools/test/connectivity/acts/framework/
Dsetup.py19 import os
70 test_path = os.path.join(os.path.dirname(__file__),
143 our_dir = os.path.abspath(os.path.dirname(__file__))
147 if os.getcwd() in sys.path:
148 sys.path.remove(os.getcwd())
169 framework_dir = os.path.dirname(os.path.realpath(__file__))
171 os.path.join(framework_dir, 'acts', 'bin', 'act.py'),
172 os.path.join(framework_dir, 'acts', 'bin', 'monsoon.py')
196 if os.path.islink(act_file):
197 os.unlink(act_file)
[all …]
/tools/tradefederation/core/atest/tools/
Datest_tools.py23 import os
34 MAC_UPDB_SRC = os.path.join(os.path.dirname(__file__), 'updatedb_darwin.sh')
35 MAC_UPDB_DST = os.path.join(os.getenv(constants.ANDROID_HOST_OUT, ''), 'bin')
38 SEARCH_TOP = os.getenv(constants.ANDROID_BUILD_TOP, '')
40 OSNAME = os.uname()[0]
69 if not os.path.isdir(dirname):
70 os.makedirs(dirname)
77 shutil.copy2(MAC_UPDB_SRC, os.path.join(MAC_UPDB_DST, UPDATEDB))
78 os.chmod(os.path.join(MAC_UPDB_DST, UPDATEDB), 0755)
83 if os.path.isfile(index):
[all …]
/tools/repohooks/rh/
Dconfig_test.py22 import os
27 REPOTOOLS = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
28 REPO_ROOT = os.path.dirname(os.path.dirname(REPOTOOLS))
38 assert var in os.environ, '$%s missing in environment' % (var,)
39 assertEqual('env[%s]' % (var,), value, os.environ[var])
69 check_commit_id(os.environ['REPO_LREV'])
70 print(os.environ['REPO_RREV'])
71 check_commit_id(os.environ['PREUPLOAD_COMMIT'])
/tools/asuite/aidegen/
Daidegen_run_unittests.py19 import os
38 base_path = os.path.dirname(os.path.realpath(__file__))
40 for dirpath, _, files in os.walk(base_path):
44 full_file_path = os.path.join(dirpath, _file)
45 rel_file_path = os.path.relpath(full_file_path, base_path)
46 rel_file_path, _ = os.path.splitext(rel_file_path)
47 rel_file_path = rel_file_path.replace(os.sep, ".")
/tools/tradefederation/core/atest/test_finders/
Dtest_finder_utils.py22 import os
68 _CPU_COUNT = 0 if os.uname()[0] == 'Linux' else multiprocessing.cpu_count()
119 _VTS_PUSH_DIR = os.path.join(os.environ.get(constants.ANDROID_BUILD_TOP, ''),
186 cls = os.path.splitext(os.path.split(test_path)[1])[0]
239 if not os.path.isfile(test_path):
354 build_top = os.environ.get(constants.ANDROID_BUILD_TOP)
364 out_dirs.append(os.path.dirname(out_file.strip()))
366 custom_out_dir = os.environ.get(constants.ANDROID_OUT_DIR)
369 if os.path.isabs(custom_out_dir):
372 user_out_dir = os.path.join(build_top, custom_out_dir)
[all …]

12345678910>>...16