Home
last modified time | relevance | path

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

12345678910>>...15

/build/soong/python/tests/
Dpy-cmd_test.py30 assert_equal("os.path.basename(__file__)", os.path.basename(__file__), "py-cmd_test.py")
51 assert_equal("basename(sys.executable)", os.path.basename(sys.executable), 'py2-cmd')
53 assert_equal("basename(sys.executable)", os.path.basename(sys.executable), 'py3-cmd')
59 assert_equal("len(sys.path)", len(sys.path), 4)
60 assert_equal("sys.path[0]", sys.path[0], os.path.dirname(__file__))
61 assert_equal("sys.path[1]", sys.path[1], "/extra")
62 assert_equal("sys.path[2]", sys.path[2], os.path.join(sys.executable, "internal"))
63 assert_equal("sys.path[3]", sys.path[3], os.path.join(sys.executable, "internal", "stdlib"))
65 assert_equal("len(sys.path)", len(sys.path), 8)
66 assert_equal("sys.path[0]", sys.path[0], os.path.abspath(os.path.dirname(__file__)))
[all …]
/build/make/tools/releasetools/merge/
Dmerge_dexopt.py91 dexpreopt_tools_files_temp_dir = os.path.join(temp_dir, 'tools')
92 dexpreopt_framework_config_files_temp_dir = os.path.join(
94 dexpreopt_vendor_config_files_temp_dir = os.path.join(temp_dir,
111 os.path.join(output_target_files_dir, 'SYSTEM'),
112 os.path.join(temp_dir, 'system'))
114 os.path.join(output_target_files_dir, 'VENDOR'),
115 os.path.join(temp_dir, 'vendor'))
138 apex_root = os.path.join(output_target_files_dir, 'SYSTEM', 'apex')
145 apex_extract_root_dir = os.path.join(temp_dir, 'apex')
148 for apex in (glob.glob(os.path.join(apex_root, '*.apex')) +
[all …]
Dtest_merge_utils.py17 import os.path
32 def createEmptyFile(path): argument
33 if not os.path.exists(os.path.dirname(path)):
34 os.makedirs(os.path.dirname(path))
35 open(path, 'a').close()
36 return path
44 os.path.relpath(path=filepath, start=start) for filepath in filepaths)
55 createEmptyFile(os.path.join(input_dir, 'a.cpp')),
56 createEmptyFile(os.path.join(input_dir, 'b.cpp')),
57 createEmptyFile(os.path.join(input_dir, 'subdir', 'c.txt')),
[all …]
Dtest_merge_meta.py17 import os.path
40 os.path.join(self.testdata_dir, 'apexkeys_framework.txt'),
41 os.path.join(framework_meta_dir, 'apexkeys.txt'))
45 os.path.join(self.testdata_dir, 'apexkeys_vendor.txt'),
46 os.path.join(vendor_meta_dir, 'apexkeys.txt'))
52 merged_path = os.path.join(self.testdata_dir, 'apexkeys_merge.txt')
58 output_path = os.path.join(output_meta_dir, 'apexkeys.txt')
70 os.path.join(self.testdata_dir, 'apexkeys_framework.txt'),
71 os.path.join(framework_meta_dir, 'apexkeys.txt'))
75 os.path.join(self.testdata_dir, 'apexkeys_framework_conflict.txt'),
[all …]
Dtest_merge_compatibility_checks.py17 import os.path
45 def write_temp_file(path, data=''): argument
46 full_path = os.path.join(product_out_dir, path)
47 if not os.path.exists(os.path.dirname(full_path)):
48 os.makedirs(os.path.dirname(full_path))
82 os.path.join(output_dir, partition, 'apex', os.path.basename(source)))
87 os.makedirs(os.path.join(output_dir, 'SYSTEM/apex'))
88 os.makedirs(os.path.join(output_dir, 'VENDOR/apex'))
91 os.path.join(self.testdata_dir, 'has_apk.apex'), output_dir, 'SYSTEM')
93 os.path.join(test_utils.get_current_dir(),
[all …]
Dmerge_meta.py58 framework_meta_dir = os.path.join(temp_dir, 'framework_meta', 'META')
61 output_dir=os.path.dirname(framework_meta_dir),
64 vendor_meta_dir = os.path.join(temp_dir, 'vendor_meta', 'META')
67 output_dir=os.path.dirname(vendor_meta_dir),
70 merged_meta_dir = os.path.join(merged_dir, 'META')
96 UpdateCareMapImageSizeProps(images_dir=os.path.join(merged_dir, 'IMAGES'))
108 path=os.path.join(merged_meta_dir, 'misc_info.txt'))
116 with open(os.path.join(framework_meta_dir, 'ab_partitions.txt')) as f:
119 with open(os.path.join(vendor_meta_dir, 'ab_partitions.txt')) as f:
124 path=os.path.join(merged_meta_dir, 'ab_partitions.txt'))
[all …]
/build/make/tools/releasetools/
Dtest_validate_target_files.py20 import os.path
49 os.path.join(self.testdata_dir, 'testkey.pk8'),
50 os.path.join(self.testdata_dir, 'testkey.x509.pem'), output_file]
60 os.mkdir(os.path.join(input_tmp, 'IMAGES'))
61 boot_image = os.path.join(input_tmp, 'IMAGES', 'boot.img')
68 'verity_key' : os.path.join(self.testdata_dir, 'testkey.x509.pem'),
75 os.mkdir(os.path.join(input_tmp, 'IMAGES'))
76 boot_image = os.path.join(input_tmp, 'IMAGES', 'boot.img')
83 'verity_key' : os.path.join(self.testdata_dir, 'verity.x509.pem'),
92 os.mkdir(os.path.join(input_tmp, 'IMAGES'))
[all …]
Dtest_sign_apex.py17 import os.path
28 self.assertTrue(os.path.exists(self.testdata_dir))
34 foo_apex = os.path.join(self.testdata_dir, 'foo.apex')
35 payload_key = os.path.join(self.testdata_dir, 'testkey_RSA4096.key')
36 container_key = os.path.join(self.testdata_dir, 'testkey')
43 self.assertTrue(os.path.exists(signed_foo_apex))
47 test_apex = os.path.join(self.testdata_dir, 'has_apk.apex')
48 payload_key = os.path.join(self.testdata_dir, 'testkey_RSA4096.key')
49 container_key = os.path.join(self.testdata_dir, 'testkey')
50 apk_keys = {'wifi-service-resources.apk': os.path.join(
[all …]
Dtest_check_target_files_vintf.py17 import os.path
57 def write_string_to_file(content, path, mode='w'): argument
58 if not os.path.isdir(os.path.dirname(path)):
59 os.makedirs(os.path.dirname(path))
60 with open(path, mode=mode) as f:
70 test_delta_dir = os.path.join(self.testdata_dir, test_delta_rel_path)
75 write_string_to_file(content, os.path.join(test_dir, rel_path))
79 rel_root = os.path.relpath(root, test_delta_dir)
83 output_file = os.path.join(test_dir, rel_root, f)
84 with open(os.path.join(root, f)) as inp:
[all …]
Dtest_utils.py24 import os.path
57 current_dir = os.path.dirname(os.path.realpath(__file__))
58 return os.path.join(current_dir, 'testdata')
63 current_dir = os.path.dirname(os.path.realpath(__file__))
69 def signapk_exists(path): argument
70 signapk_path = os.path.realpath(
71 os.path.join(path, 'framework', 'signapk.jar'))
72 return os.path.exists(signapk_path)
75 full_path = os.path.realpath(os.path.join(
81 current_dir = os.path.dirname(os.path.realpath(__file__))
[all …]
Dtest_add_img_to_target_files.py18 import os.path
41 path = os.path.join(OPTIONS.input_tmp, prefix)
42 if not os.path.exists(path):
43 os.mkdir(path)
46 image_path = os.path.join(path, image + '.img')
50 images_path = os.path.join(OPTIONS.input_tmp, 'IMAGES')
51 if not os.path.exists(images_path):
63 radio_path = os.path.join(OPTIONS.input_tmp, 'RADIO')
64 if not os.path.exists(radio_path):
66 with open(os.path.join(radio_path, 'modem.img'), 'wb') as image_fp:
[all …]
Dvalidate_target_files.py36 import os.path
49 assert os.path.exists(unpacked_name)
63 unpacked_name = os.path.join(input_tmp, file_path)
64 assert os.path.exists(unpacked_name)
76 path = os.path.join(input_tmp, "IMAGES", which + ".img")
77 if not IsSparseImage(path):
119 unpacked_name = os.path.join(
182 if not os.path.exists(os.path.join(input_tmp, script_path)):
187 with open(os.path.join(input_tmp, script_path), 'r') as script:
254 if not os.path.isdir(src):
[all …]
Dcheck_target_files_vintf.py59 target_files_path = os.path.join(input_tmp, target_files_rel_path)
60 if os.path.isdir(target_files_path):
95 version_path = os.path.join(input_tmp, 'META/kernel_version.txt')
96 config_path = os.path.join(input_tmp, 'META/kernel_configs.txt')
98 if not os.path.isfile(version_path) or not os.path.isfile(config_path):
165 def PathToPatterns(path): argument
166 if path[-1] == '/':
167 path += '**'
177 if path.startswith(device_path):
178 suffix = path[len(device_path):]
[all …]
/build/make/tools/atree/
Dfs.cpp21 is_dir(const string& path) in is_dir() argument
25 err = stat(path.c_str(), &st); in is_dir()
30 remove_file(const string& path) in remove_file() argument
32 int err = unlink(path.c_str()); in remove_file()
34 fprintf(stderr, "error deleting file %s (%s)\n", path.c_str(), in remove_file()
42 remove_recursively(const string& path) in remove_recursively() argument
46 if (is_dir(path)) { in remove_recursively()
47 DIR *d = opendir(path.c_str()); in remove_recursively()
50 path.c_str(), strerror(errno)); in remove_recursively()
63 string full = path; in remove_recursively()
[all …]
/build/soong/finder/fs/
Dfs.go41 for path, bytes := range files {
42 dir := filepath.Dir(path)
44 fs.WriteFile(path, bytes, 0777)
53 Lstat(path string) (stats os.FileInfo, err error)
54 Stat(path string) (stats os.FileInfo, err error)
55 ReadDir(path string) (contents []DirEntryInfo, err error)
63 WriteFile(path string, data []byte, perm os.FileMode) (err error)
64 Remove(path string) (err error)
65 RemoveAll(path string) (err error)
99 func (osFs) Lstat(path string) (stats os.FileInfo, err error) {
[all …]
Dtest.go26 func Write(t *testing.T, path string, content string, filesystem *MockFs) {
27 parent := filepath.Dir(path)
29 err := filesystem.WriteFile(path, []byte(content), 0777)
35 func Create(t *testing.T, path string, filesystem *MockFs) {
36 Write(t, path, "hi", filesystem)
39 func Delete(t *testing.T, path string, filesystem *MockFs) {
40 err := filesystem.Remove(path)
46 func RemoveAll(t *testing.T, path string, filesystem *MockFs) {
47 err := filesystem.RemoveAll(path)
72 func Read(t *testing.T, path string, filesystem *MockFs) string {
[all …]
/build/blueprint/pathtools/
Dlists.go27 for i, path := range paths {
28 result[i] = filepath.Join(prefix, path)
35 for i, path := range paths {
36 result[i] = ReplaceExtension(path, extension)
43 func ReplaceExtension(path string, extension string) string {
44 oldExt := filepath.Ext(path)
46 path = strings.TrimSuffix(path, oldExt)
48 return path + "." + extension
/build/bazel/ci/
Drbc_dashboard.py60 path = '.'
61 while not os.path.isfile(os.path.join(path, 'build/soong/soong_ui.bash')):
62 if os.path.abspath(path) == '/':
64 path = os.path.join(path, '..')
65 return os.path.abspath(path)
84 with open(os.path.join(out_dir, 'build.log'), 'wb') as f:
155 … name = 'soong_build.ninja' if pair[0].endswith('soong/build.ninja') else os.path.basename(pair[0])
156 with open(os.path.join(results_folder, name)+'.diff', 'wb') as f:
199 def cleanup_empty_files(path): argument
200 if os.path.isfile(path):
[all …]
/build/soong/android/
Dpaths.go235 if path, ok := p.(genPathProvider); ok {
236 return path.genPathWithExt(ctx, subdir, ext)
245 if path, ok := p.(objPathProvider); ok {
246 return path.objPathWithExt(ctx, subdir, ext)
256 if path, ok := p.(resPathProvider); ok {
257 return path.resPathWithName(ctx, name)
265 path Path // nil if invalid. member
270 func OptionalPathForPath(path Path) OptionalPath {
271 return OptionalPath{path: path}
282 return p.path != nil
[all …]
Drule_builder.go203 func (r *RuleBuilder) Temporary(path WritablePath) {
204 r.temporariesSet[path] = true
496 for _, path := range depFiles[1:] {
497 Rel(r.ctx, r.outDir.String(), path.String())
597 for path := range r.temporariesSet {
598 Rel(r.ctx, r.outDir.String(), path.String())
765 func checkPathNotNil(path Path) {
766 if path == nil {
771 func (c *RuleBuilderCommand) addInput(path Path) string {
772 checkPathNotNil(path)
[all …]
/build/make/tools/compliance/
Dpolicy_walk.go21 Context(lg *LicenseGraph, path TargetEdgePath, edge *TargetEdge) interface{}
28 func (ctx NoEdgeContext) Context(lg *LicenseGraph, path TargetEdgePath, edge *TargetEdge) interface…
39 func (ctx ApplicableConditionsContext) Context(lg *LicenseGraph, path TargetEdgePath, edge *TargetE…
41 if len(path) > 0 {
42 universe = path[len(path)-1].ctx.(LicenseConditionSet)
50 type VisitNode func(lg *LicenseGraph, target *TargetNode, path TargetEdgePath) bool
55 path := NewTargetEdgePath(32)
59 visitChildren := visit(lg, fnode, *path)
68 edgeContext = ctx.Context(lg, *path, edge)
70 path.Push(edge, edgeContext)
[all …]
/build/bazel_common_rules/dist/
Ddist.py44 runfiles_directory = os.path.dirname(__file__)
46 os.path.join(runfiles_directory, pattern))
61 src_relpath = os.path.basename(src) if flat else src
62 src_relpath = os.path.join(prefix, src_relpath)
63 src_abspath = os.path.abspath(src)
65 dst = os.path.join(dist_dir, src_relpath)
66 if os.path.isfile(src):
67 dst_dirname = os.path.dirname(dst)
69 if not os.path.exists(dst_dirname):
73 elif os.path.isdir(src):
[all …]
/build/soong/scripts/hiddenapi/
Danalyze_bcpf_test.py17 import os.path
65 os.makedirs(os.path.dirname(abs_path), exist_ok=True)
70 for path, contents in fs.items():
71 abs_path = os.path.join(self.test_dir, path)
84 out_dir = os.path.join(self.test_dir, "out")
92 tool_path=os.path.join(out_dir, "bin"),
229 path="bcpf-dir/hiddenapi/"
236 path="bcpf-dir/hiddenapi/hiddenapi-max-target-p.txt",
242 path="bcpf-dir/hiddenapi/hiddenapi-max-target-q.txt",
247 path="bcpf-dir/hiddenapi/"
[all …]
/build/soong/scripts/
Dgen-kotlin-build-file.py70 path = os.path.abspath(entry)
71 f.write(' <classpath path="%s"/>\n' % path)
76 path = os.path.abspath(src)
78 f.write(' <javaSourceRoots path="%s"/>\n' % path)
80 f.write(' <sources path="%s"/>\n' % path)
86 path = os.path.abspath(src)
87 f.write(' <sources path="%s"/>\n' % path)
88 f.write(' <commonSources path="%s"/>\n' % path)
/build/make/tools/
Dmk2bp_partition.py21 path = '.'
22 while not os.path.isfile(os.path.join(path, 'build/soong/soong_ui.bash')):
23 if os.path.abspath(path) == '/':
25 path = os.path.join(path, '..')
26 return os.path.abspath(path)
58 filename = os.path.join(installed_product_out, "mk2bp_remaining.csv")
59 copy_filename = os.path.join(installed_product_out, lunch_target + "_mk2bp_remaining.csv")
61 if not os.path.exists(copy_filename):

12345678910>>...15