/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/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_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 53 current_dir = os.path.dirname(os.path.realpath(__file__)) 54 return os.path.join(current_dir, 'testdata') 60 def signapk_exists(path): argument 61 signapk_path = os.path.realpath( 62 os.path.join(path, 'framework', 'signapk.jar')) 63 return os.path.exists(signapk_path) 66 full_path = os.path.realpath(os.path.join( 72 current_dir = os.path.dirname(os.path.realpath(__file__)) 73 for path in ( [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_add_img_to_target_files.py | 18 import os.path 40 path = os.path.join(OPTIONS.input_tmp, prefix) 41 if not os.path.exists(path): 42 os.mkdir(path) 45 image_path = os.path.join(path, image + '.img') 49 images_path = os.path.join(OPTIONS.input_tmp, 'IMAGES') 50 if not os.path.exists(images_path): 62 radio_path = os.path.join(OPTIONS.input_tmp, 'RADIO') 63 if not os.path.exists(radio_path): 65 with open(os.path.join(radio_path, 'modem.img'), 'wb') as image_fp: [all …]
|
D | add_img_to_target_files.py | 99 self.name = os.path.join(input_dir, prefix, name) 102 self._zip_name = os.path.join(prefix, name) 153 if os.path.exists(img.name): 158 output_file = os.path.join(OPTIONS.input_tmp, "SYSTEM", fn) 190 if os.path.exists(img.name): 202 if os.path.exists(img.name): 207 ofile = open(os.path.join(OPTIONS.input_tmp, "VENDOR", fn), "w") 238 if os.path.exists(img.name): 256 if os.path.exists(img.name): 272 if os.path.exists(img.name): [all …]
|
D | add_img_to_target_files | 99 self.name = os.path.join(input_dir, prefix, name) 102 self._zip_name = os.path.join(prefix, name) 153 if os.path.exists(img.name): 158 output_file = os.path.join(OPTIONS.input_tmp, "SYSTEM", fn) 190 if os.path.exists(img.name): 202 if os.path.exists(img.name): 207 ofile = open(os.path.join(OPTIONS.input_tmp, "VENDOR", fn), "w") 238 if os.path.exists(img.name): 256 if os.path.exists(img.name): 272 if os.path.exists(img.name): [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: 242 if not os.path.isdir(src): 245 if os.path.exists(os.path.join(dst, filename)): 247 os.symlink(os.path.join(src, filename), os.path.join(dst, filename)) [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): 168 def PathToPatterns(path): argument 169 if path[-1] == '/': 170 path += '*' 172 if path.startswith(device_path): 173 suffix = path[len(device_path):] [all …]
|
D | merge_target_files.py | 233 def write_sorted_data(data, path): argument 244 with open(path, 'w') as output: 292 os.path.relpath(path=os.path.join(dirpath, filename), start=from_dir) 300 original_file_path = os.path.join(from_dir, file_path) 301 copied_file_path = os.path.join(to_dir, file_path) 302 copied_file_dir = os.path.dirname(copied_file_path) 303 if not os.path.exists(copied_file_dir): 305 if os.path.islink(original_file_path): 387 framework_ab_partitions_txt = os.path.join(framework_target_files_temp_dir, 390 vendor_ab_partitions_txt = os.path.join(vendor_target_files_temp_dir, 'META', [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 74 apk_name = os.path.basename(entry) 100 apk_path = os.path.join(payload_dir, entry) 101 assert os.path.exists(self.apex_path) 103 key_name = apk_keys.get(os.path.basename(entry)) 124 'manifest': os.path.join(apex_dir, 'apex_manifest.pb'), 125 'build_info': os.path.join(apex_dir, 'apex_build_info.pb'), 129 assert os.path.exists(filename), 'file {} not found'.format(filename) 133 path = os.path.join(payload_dir, name) 134 if os.path.isfile(path): [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/soong/android/ |
D | paths.go | 155 if path, ok := p.(genPathProvider); ok { 156 return path.genPathWithExt(ctx, subdir, ext) 165 if path, ok := p.(objPathProvider); ok { 166 return path.objPathWithExt(ctx, subdir, ext) 176 if path, ok := p.(resPathProvider); ok { 177 return path.resPathWithName(ctx, name) 186 path Path member 190 func OptionalPathForPath(path Path) OptionalPath { 191 if path == nil { 194 return OptionalPath{valid: true, path: path} [all …]
|
D | rule_builder.go | 145 func (r *RuleBuilder) Temporary(path WritablePath) { 146 r.temporariesSet[path] = true 385 for _, path := range depFiles[1:] { 386 Rel(ctx, r.sboxOutDir.String(), path.String()) 497 func (c *RuleBuilderCommand) addInput(path Path) string { 499 if rel, isRel, _ := maybeRelErr(c.sboxOutDir.String(), path.String()); isRel { 503 c.inputs = append(c.inputs, path) 504 return path.String() 507 func (c *RuleBuilderCommand) addImplicit(path Path) string { 509 if rel, isRel, _ := maybeRelErr(c.sboxOutDir.String(), path.String()); isRel { [all …]
|
/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/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) 41 func ReplaceExtension(path string, extension string) string { 42 dot := strings.LastIndex(path, ".") 44 return path 46 return path[:dot+1] + extension
|
/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/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), \
|
/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)
|