/build/make/tools/releasetools/ |
D | test_merge_target_files.py | 17 import os.path 37 if not os.path.exists(os.path.dirname(path)): 38 os.makedirs(os.path.dirname(path)) 43 os.symlink(source, dest) 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')), 62 createEmptyFile(os.path.join(input_dir, 'subdir', 'd.txt')), 64 os.path.join(input_dir, 'subdir', 'subsubdir', 'e.txt')), [all …]
|
D | test_validate_target_files.py | 19 import os 20 import os.path 39 kernel_fp.write(os.urandom(10)) 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') [all …]
|
D | test_utils.py | 23 import os 24 import os.path 39 not os.environ.get('ANDROID_BUILD_TOP') and 40 os.environ.get('FORCE_RUN_RELEASETOOLS') != '1') 53 current_dir = os.path.dirname(os.path.realpath(__file__)) 54 return os.path.join(current_dir, 'testdata') 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( [all …]
|
D | test_check_target_files_vintf.py | 17 import os.path 58 if not os.path.isdir(os.path.dirname(path)): 59 os.makedirs(os.path.dirname(path)) 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)) 78 for root, _, files in os.walk(test_delta_dir): 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: 106 write_string_to_file('', os.path.join(test_dir, 'META/kernel_configs.txt')) [all …]
|
D | add_img_to_target_files.py | 51 import os 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): [all …]
|
D | add_img_to_target_files | 51 import os 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): [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 | 17 import os 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): 51 os.mkdir(images_path) 62 radio_path = os.path.join(OPTIONS.input_tmp, 'RADIO') [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 | target_files_diff.py | 26 import os 158 list1 = sorted(os.listdir(dir1)) 159 list2 = sorted(os.listdir(dir2)) 162 name = os.path.join(prefix, entry) 163 name1 = os.path.join(dir1, entry) 164 name2 = os.path.join(dir2, entry) 170 if os.path.islink(name1) and os.path.islink(name2): 171 link1 = os.readlink(name1) 172 link2 = os.readlink(name2) 177 elif os.path.islink(name1) or os.path.islink(name2): [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): 244 for filename in os.listdir(src): 245 if os.path.exists(os.path.join(dst, filename)): [all …]
|
D | merge_builds.py | 54 import os 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): 76 os.remove(symlink_path) 80 os.symlink(image_path, 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, [all …]
|
/build/blueprint/pathtools/ |
D | fs_test.go | 108 wd, _ := os.Getwd() 125 os.Chdir(absTestDataDir) 126 defer os.Chdir(wd) 135 os.Chdir("/") 136 defer os.Chdir(wd) 170 {"dangling", false, os.ErrNotExist}, 172 {"a/missing", false, os.ErrNotExist}, 173 {"b/missing", false, os.ErrNotExist}, 174 {"c/missing", false, os.ErrNotExist}, 175 {"d/missing", false, os.ErrNotExist}, [all …]
|
/build/soong/symbol_inject/cmd/ |
D | symbol_inject.go | 39 fmt.Fprintln(os.Stderr, s) 41 os.Exit(1) 62 r, err := os.Open(*input) 64 fmt.Fprintln(os.Stderr, err.Error()) 65 os.Exit(2) 72 fmt.Fprintln(os.Stderr, err.Error()) 73 os.Exit(6) 78 w, err := os.OpenFile(*output, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0777) 80 fmt.Fprintln(os.Stderr, err.Error()) 81 os.Exit(3) [all …]
|
/build/soong/third_party/zip/ |
D | struct.go | 94 func (h *FileHeader) FileInfo() os.FileInfo { 112 func (fi headerFileInfo) Mode() os.FileMode { return fi.fh.Mode() } 120 func FileInfoHeader(fi os.FileInfo) (*FileHeader, error) { 209 func (h *FileHeader) Mode() (mode os.FileMode) { 217 mode |= os.ModeDir 223 func (h *FileHeader) SetMode(mode os.FileMode) { 228 if mode&os.ModeDir != 0 { 241 func msdosModeToFileMode(m uint32) (mode os.FileMode) { 243 mode = os.ModeDir | 0777 253 func fileModeToUnixMode(mode os.FileMode) uint32 { [all …]
|
/build/soong/python/scripts/ |
D | stub_template_host.txt | 3 import os 19 search_path = os.getenv('PATH', os.defpath).split(os.pathsep) 22 path = os.path.join(directory, name) 24 if os.path.isfile(path) and os.access(path, os.X_OK): 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)] 60 old_python_path = os.environ.get(PYTHON_PATH) 70 main_filepath = os.path.join(runfiles_path, MAIN_FILE) 71 assert os.path.exists(main_filepath), \ [all …]
|
/build/blueprint/gotestrunner/ |
D | gotestrunner.go | 47 io.Copy(os.Stdout, reader) 54 fmt.Fprintln(os.Stderr, "error: must pass at least one test executable") 55 os.Exit(1) 60 fmt.Fprintln(os.Stderr, "error: Failed to locate test binary:", err) 70 os.Setenv("GOROOT", absRoot) 72 fmt.Fprintln(os.Stderr, "error: Failed to locate GOROOT:", err) 76 cmd.Stderr = os.Stderr 79 fmt.Fprintln(os.Stderr, err) 80 os.Exit(1) 85 fmt.Fprintln(os.Stderr, err) [all …]
|
/build/soong/python/tests/ |
D | py-cmd_test.py | 15 import os 30 assert_equal("os.path.basename(__file__)", os.path.basename(__file__), "py-cmd_test.py") 32 if os.getenv('ARGTEST', False): 36 elif os.getenv('ARGTEST2', False): 43 if os.getenv('ARGTEST_ONLY', False): 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') 60 assert_equal("sys.path[0]", sys.path[0], os.path.dirname(__file__)) 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")) [all …]
|
/build/soong/cmd/diff_target_files/ |
D | diff_target_files.go | 46 fmt.Fprintf(os.Stderr, "Error, exactly two arguments are required\n") 47 os.Exit(1) 52 fmt.Fprintf(os.Stderr, "Error parsing allowlists: %v\n", err) 53 os.Exit(1) 58 fmt.Fprintf(os.Stderr, "Error opening zip file %v: %v\n", flag.Arg(0), err) 59 os.Exit(1) 65 fmt.Fprintf(os.Stderr, "Error opening zip file %v: %v\n", flag.Arg(1), err) 66 os.Exit(1) 72 fmt.Fprintf(os.Stderr, "Error comparing zip files: %v\n", err) 73 os.Exit(1) [all …]
|
/build/soong/android/ |
D | env.go | 43 soongDelveListen = os.Getenv("SOONG_DELVE") 48 for _, env := range os.Environ() { 60 os.Clearenv() 69 fmt.Fprintln(os.Stderr, "SOONG_DELVE is set but failed to find dlv") 70 os.Exit(1) 78 os.Args[0], 81 dlvArgv = append(dlvArgv, os.Args[1:]...) 82 os.Chdir(absSrcDir) 84 fmt.Fprintln(os.Stderr, "exec() failed while trying to reexec with Delve") 85 os.Exit(1) [all …]
|
/build/soong/cmd/soong_env/ |
D | soong_env.go | 30 fmt.Fprintf(os.Stderr, "usage: soong_env env_file\n") 31 fmt.Fprintf(os.Stderr, "exits with success if the environment varibles in env_file match\n") 32 fmt.Fprintf(os.Stderr, "the current environment\n") 34 os.Exit(2) 46 fmt.Fprintf(os.Stderr, "error: %s\n", err.Error()) 47 os.Exit(1) 51 os.Exit(1) 54 os.Exit(0)
|
/build/soong/zip/cmd/ |
D | main.go | 110 for _, arg := range os.Args { 114 fmt.Fprintln(os.Stderr, err.Error()) 115 os.Exit(1) 126 …fmt.Fprintf(os.Stderr, "usage: soong_zip -o zipfile [-m manifest] [-C dir] [-f|-l file] [-D dir]..… 128 os.Exit(2) 156 fmt.Fprintf(os.Stderr, "unexpected arguments %s\n", strings.Join(flags.Args(), " ")) 161 f, err := os.Create(*cpuProfile) 163 fmt.Fprintln(os.Stderr, err.Error()) 164 os.Exit(1) 172 f, err := os.Create(*traceFile) [all …]
|
/build/soong/cmd/host_bionic_inject/ |
D | host_bionic_inject.go | 39 os.Exit(1) 42 r, err := os.Open(inputFile) 44 fmt.Fprintln(os.Stderr, err.Error()) 45 os.Exit(2) 51 fmt.Fprintln(os.Stderr, err.Error()) 52 os.Exit(3) 57 fmt.Fprintln(os.Stderr, err.Error()) 58 os.Exit(4) 63 fmt.Fprintln(os.Stderr, err.Error()) 64 os.Exit(5) [all …]
|
/build/soong/finder/fs/ |
D | fs.go | 53 Lstat(path string) (stats os.FileInfo, err error) 54 Stat(path string) (stats os.FileInfo, err error) 57 InodeNumber(info os.FileInfo) (number uint64, err error) 58 DeviceNumber(info os.FileInfo) (number uint64, err error) 59 PermTime(info os.FileInfo) (time time.Time, err error) 63 WriteFile(path string, data []byte, perm os.FileMode) (err error) 75 Mode() os.FileMode // the file type encoded as an os.FileMode 81 mode os.FileMode 85 var _ DirEntryInfo = os.FileInfo(nil) 88 func (d *dirEntryInfo) Mode() os.FileMode { return d.mode } [all …]
|
/build/blueprint/bpfmt/ |
D | bpfmt.go | 35 fmt.Fprintln(os.Stderr, err) 44 fmt.Fprintln(os.Stderr, violation) 45 fmt.Fprintln(os.Stderr, "usage: bpfmt [flags] [path ...]") 47 os.Exit(2) 51 f, err := os.Open(filename) 71 fmt.Fprintln(os.Stderr, err) 114 visitFile := func(path string, f os.FileInfo, err error) error { 116 err = processFile(path, os.Stdout) 138 fmt.Fprintln(os.Stderr, "error: cannot use -w with standard input") 139 os.Exit(2) [all …]
|