/build/make/tools/releasetools/ |
D | test_merge_target_files.py | 17 import os.path 36 def createEmptyFile(path): argument 37 if not os.path.exists(os.path.dirname(path)): 38 os.makedirs(os.path.dirname(path)) 39 open(path, 'a').close() 40 return path 48 os.path.relpath(path=filepath, start=start) for filepath in filepaths) 59 createEmptyFile(os.path.join(input_dir, 'a.cpp')), 60 createEmptyFile(os.path.join(input_dir, 'b.cpp')), 61 createEmptyFile(os.path.join(input_dir, 'subdir', 'c.txt')), [all …]
|
D | test_validate_target_files.py | 20 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 …]
|
D | test_sign_apex.py | 17 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 …]
|
D | test_check_target_files_vintf.py | 17 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 …]
|
D | test_utils.py | 24 import os.path 55 current_dir = os.path.dirname(os.path.realpath(__file__)) 56 return os.path.join(current_dir, 'testdata') 61 current_dir = os.path.dirname(os.path.realpath(__file__)) 67 def signapk_exists(path): argument 68 signapk_path = os.path.realpath( 69 os.path.join(path, 'framework', 'signapk.jar')) 70 return os.path.exists(signapk_path) 73 full_path = os.path.realpath(os.path.join( 79 current_dir = os.path.dirname(os.path.realpath(__file__)) [all …]
|
D | test_add_img_to_target_files.py | 18 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 …]
|
D | validate_target_files.py | 36 import os.path 47 assert os.path.exists(unpacked_name) 61 unpacked_name = os.path.join(input_tmp, file_path) 62 assert os.path.exists(unpacked_name) 111 unpacked_name = os.path.join( 172 if not os.path.exists(os.path.join(input_tmp, script_path)): 177 with open(os.path.join(input_tmp, script_path), 'r') as script: 243 if not os.path.isdir(src): 246 if os.path.exists(os.path.join(dst, filename)): 248 os.symlink(os.path.join(src, filename), os.path.join(dst, filename)) [all …]
|
D | merge_target_files.py | 236 def write_sorted_data(data, path): argument 247 with open(path, 'w') as output: 295 os.path.relpath(path=os.path.join(dirpath, filename), start=from_dir) 303 original_file_path = os.path.join(from_dir, file_path) 304 copied_file_path = os.path.join(to_dir, file_path) 305 copied_file_dir = os.path.dirname(copied_file_path) 306 if not os.path.exists(copied_file_dir): 308 if os.path.islink(original_file_path): 396 framework_ab_partitions_txt = os.path.join(framework_target_files_temp_dir, 399 vendor_ab_partitions_txt = os.path.join(vendor_target_files_temp_dir, 'META', [all …]
|
D | test_build_image.py | 18 import os.path 122 with open(os.path.join(root_dir, 'init'), 'w') as init_fp: 126 with open(os.path.join(origin_in, 'file'), 'w') as in_fp: 128 os.symlink('../etc', os.path.join(origin_in, 'symlink')) 140 os.path.join(in_dir, 'init'), os.path.join(root_dir, 'init'))) 142 os.path.join(in_dir, 'system', 'file'), 143 os.path.join(origin_in, 'file'))) 144 self.assertTrue(os.path.islink(os.path.join(in_dir, 'system', 'symlink'))) 151 with open(os.path.join(root_dir, 'init'), 'w') as init_fp: 155 with open(os.path.join(origin_in, 'file'), 'w') as in_fp: [all …]
|
D | check_target_files_vintf.py | 59 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 += '*' 169 if path.startswith(device_path): 170 suffix = path[len(device_path):] [all …]
|
D | add_img_to_target_files.py | 102 self.name = os.path.join(input_dir, *args) 105 self._zip_name = os.path.join(*args) 117 if os.path.exists(img.name): 122 output_file = os.path.join(OPTIONS.input_tmp, "SYSTEM", fn) 153 if os.path.exists(img.name): 165 if os.path.exists(img.name): 170 ofile = open(os.path.join(OPTIONS.input_tmp, "VENDOR", fn), "w") 201 if os.path.exists(img.name): 219 if os.path.exists(img.name): 235 if os.path.exists(img.name): [all …]
|
D | add_img_to_target_files | 102 self.name = os.path.join(input_dir, *args) 105 self._zip_name = os.path.join(*args) 117 if os.path.exists(img.name): 122 output_file = os.path.join(OPTIONS.input_tmp, "SYSTEM", fn) 153 if os.path.exists(img.name): 165 if os.path.exists(img.name): 170 ofile = open(os.path.join(OPTIONS.input_tmp, "VENDOR", fn), "w") 201 if os.path.exists(img.name): 219 if os.path.exists(img.name): 235 if os.path.exists(img.name): [all …]
|
D | merge_builds.py | 72 image_path = os.path.join(OPTIONS.product_out_framework, "%s.img" % image) 73 symlink_path = os.path.join(OPTIONS.product_out_vendor, "%s.img" % image) 74 if os.path.exists(symlink_path): 75 if os.path.islink(symlink_path): 85 os.path.join(OPTIONS.product_out_framework, "misc_info.txt")) 87 os.path.join(OPTIONS.product_out_vendor, "misc_info.txt")) 100 output_super_empty_path = os.path.join(OPTIONS.product_out_vendor, 109 os.path.join(OPTIONS.product_out_framework, "misc_info.txt")) 111 os.path.join(OPTIONS.product_out_vendor, "misc_info.txt")) 120 partition_path = os.path.join(OPTIONS.product_out_vendor, [all …]
|
D | apex_utils.py | 18 import os.path 64 self.debugfs_path = os.path.join( 76 if not os.path.exists(self.debugfs_path): 92 apk_name = os.path.basename(entry) 112 if not os.path.exists(self.debugfs_path): 124 apk_path = os.path.join(payload_dir, entry) 125 assert os.path.exists(self.apex_path) 127 key_name = apk_keys.get(os.path.basename(entry)) 149 'manifest': os.path.join(apex_dir, 'apex_manifest.pb'), 150 'build_info': os.path.join(apex_dir, 'apex_build_info.pb'), [all …]
|
/build/soong/python/tests/ |
D | py-cmd_test.py | 30 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 …]
|
D | par_test.py | 30 assert_equal("os.path.basename(__file__)", os.path.basename(__file__), "par_test.py") 32 archive = os.path.dirname(__file__) 42 assert_equal("len(sys.path)", len(sys.path), 3) 43 assert_equal("sys.path[0]", sys.path[0], archive) 44 assert_equal("sys.path[1]", sys.path[1], os.path.join(archive, "internal")) 45 assert_equal("sys.path[2]", sys.path[2], os.path.join(archive, "internal", "stdlib"))
|
/build/make/tools/atree/ |
D | fs.cpp | 21 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/ |
D | fs.go | 41 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 …]
|
D | test.go | 26 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/ |
D | lists.go | 27 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/soong/android/ |
D | paths.go | 234 if path, ok := p.(genPathProvider); ok { 235 return path.genPathWithExt(ctx, subdir, ext) 244 if path, ok := p.(objPathProvider); ok { 245 return path.objPathWithExt(ctx, subdir, ext) 255 if path, ok := p.(resPathProvider); ok { 256 return path.resPathWithName(ctx, name) 265 path Path member 269 func OptionalPathForPath(path Path) OptionalPath { 270 if path == nil { 273 return OptionalPath{valid: true, path: path} [all …]
|
D | rule_builder.go | 212 func (r *RuleBuilder) Temporary(path WritablePath) { 213 r.temporariesSet[path] = true 505 for _, path := range depFiles[1:] { 506 Rel(r.ctx, r.outDir.String(), path.String()) 606 for path := range r.temporariesSet { 607 Rel(r.ctx, r.outDir.String(), path.String()) 767 func (c *RuleBuilderCommand) addInput(path Path) string { 768 c.inputs = append(c.inputs, path) 769 return c.PathForInput(path) 772 func (c *RuleBuilderCommand) addImplicit(path Path) { [all …]
|
/build/soong/scripts/ |
D | gen-kotlin-build-file.py | 70 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/soong/cc/ |
D | compiler_test.go | 33 for _, path := range shouldFail { 34 if !isThirdParty(path) { 35 t.Errorf("Expected %s to be considered third party", path) 38 for _, path := range shouldPass { 39 if isThirdParty(path) { 40 t.Errorf("Expected %s to *not* be considered third party", path)
|
/build/soong/python/scripts/ |
D | stub_template_host.txt | 22 path = os.path.join(directory, name) 24 if os.path.isfile(path) and os.access(path, os.X_OK): 25 return path 39 zf = zipfile.ZipFile(os.path.dirname(__file__)) 56 top_entries = [os.path.join(runfiles_path, i) for i in os.listdir(runfiles_path)] 57 top_pkg_dirs = [i for i in top_entries if os.path.isdir(i)] 70 main_filepath = os.path.join(runfiles_path, MAIN_FILE) 71 assert os.path.exists(main_filepath), \
|