Home
last modified time | relevance | path

Searched refs:err (Results 1 – 25 of 289) sorted by relevance

12345678910>>...12

/build/blueprint/
Dlive_tracker.go45 ruleDef, err := l.addRule(def.Rule)
46 if err != nil {
47 return err
51 err = l.addNinjaStringListDeps(def.Outputs)
52 if err != nil {
53 return err
56 err = l.addNinjaStringListDeps(def.Inputs)
57 if err != nil {
58 return err
61 err = l.addNinjaStringListDeps(def.Implicits)
[all …]
Dninja_defs.go115 err := nw.Comment(p.Comment)
116 if err != nil {
117 return err
121 err := nw.Pool(name)
122 if err != nil {
123 return err
157 value, err := parseNinjaString(scope, params.Command)
158 if err != nil {
159 return nil, fmt.Errorf("error parsing Command param: %s", err)
164 value, err = parseNinjaString(scope, params.Depfile)
[all …]
/build/soong/bpfix/cmd_lib/
Dbpfix.go47 func report(err error) {
48 fmt.Fprintln(os.Stderr, err)
53 f, err := os.Open(filename)
54 if err != nil {
55 return err
64 src, err := ioutil.ReadAll(in)
65 if err != nil {
66 return err
71 for _, err := range errs {
72 fmt.Fprintln(os.Stderr, err)
[all …]
/build/soong/cmd/diff_target_files/
Dzip_artifact.go45 zr, err := zip.OpenReader(name)
46 if err != nil {
47 return nil, err
91 zr, err := zf.Open()
92 if err != nil {
93 d.err = err
102 d.err = fmt.Errorf("invalid filename %q", zf.Name)
107 err = os.MkdirAll(filepath.Dir(path), 0777)
108 if err != nil {
109 d.err = err
[all …]
Dallow_list.go51 newAllowlists, err := parseAllowListFile(file)
52 if err != nil {
53 return nil, err
74 r, err := os.Open(file)
75 if err != nil {
76 return nil, err
87 if err := d.Decode(&jsonAllowLists); err != nil {
88 return nil, err
101 return allowLists, err
108 if match, err := Match(w.path, l[i][0].Name); err != nil {
[all …]
/build/blueprint/microfactory/
Dmicrofactory_test.go34 err := flags.Parse([]string{
38 if err != nil {
39 t.Fatal(err)
54 got, ok, err := pkgMap.Path("android/soong/ui/test")
55 if err != nil {
56 t.Error("Unexpected error in pkgMap.Path(soong):", err)
63 got, ok, err = pkgMap.Path("github.com/google/blueprint")
64 if err != nil {
65 t.Error("Unexpected error in pkgMap.Path(blueprint):", err)
77 if _, _, err := pkgMap.Path("testing"); err == nil {
[all …]
Dmicrofactory.go74 if version, err := ioutil.ReadFile(filepath.Join(runtime.GOROOT(), "VERSION")); err == nil {
79 if version, err := cmd.Output(); err == nil {
82 panic(fmt.Sprintf("Unable to discover go version: %v", err))
195 err := p.findDeps(config, path, depSet)
196 if err != nil {
197 return err
265 foundPkgs, err := parser.ParseDir(token.NewFileSet(), path, func(fi os.FileInfo) bool {
278 if err != nil {
279 return fmt.Errorf("Error parsing directory %q: %v", path, err)
311 name, err := strconv.Unquote(importSpec.Path.Value)
[all …]
/build/blueprint/bpfmt/
Dbpfmt.go34 func report(err error) {
35 fmt.Fprintln(os.Stderr, err)
51 f, err := os.Open(filename)
52 if err != nil {
53 return err
61 src, err := ioutil.ReadAll(in)
62 if err != nil {
63 return err
70 for _, err := range errs {
71 fmt.Fprintln(os.Stderr, err)
[all …]
/build/blueprint/pathtools/
Dglob.go43 …ttern string, excludes []string, follow ShouldFollowSymlinks) (matches, deps []string, err error) {
48 follow ShouldFollowSymlinks) (matches, deps []string, err error) {
53 matches, deps, err = glob(fs, pattern, false, follow)
56 if err != nil {
57 return nil, nil, err
60 matches, err = filterExcludes(matches, excludes)
61 if err != nil {
62 return nil, nil, err
79 isSymlink, err := fs.IsSymlink(match)
80 if err != nil {
[all …]
/build/soong/ui/build/
Dutil_test.go29 defer logger.Recover(func(err error) {
30 t.Error(err)
33 tmpDir, err := ioutil.TempDir("", "")
34 if err != nil {
35 t.Fatal(err)
38 err := os.RemoveAll(tmpDir)
39 if err != nil {
40 t.Errorf("Error removing tmpDir: %v", err)
46 err = os.Chmod(filepath.Join(tmpDir, "a"), 0555)
47 if err != nil {
[all …]
Dutil.go27 ret, err := filepath.Abs(p)
28 if err != nil {
29 ctx.Fatalf("Failed to get absolute path: %v", err)
64 err := os.MkdirAll(dir, 0777)
65 if err != nil {
66 ctx.Fatalf("Error creating %s: %q\n", dir, err)
77 err := os.RemoveAll(dir)
78 if err == nil {
82 if pathErr, ok := err.(*os.PathError); !ok ||
85 ctx.Fatalf("Error removing %s: %q\n", dir, err)
[all …]
/build/blueprint/bootstrap/
Dcleanup.go41 ninjaBuildDir, err := ctx.NinjaBuildDir()
42 if err != nil {
43 return err
46 targetRules, err := ctx.AllTargets()
47 if err != nil {
48 return fmt.Errorf("error determining target list: %s", err)
65 filePaths, err := parseNinjaLog(ninjaBuildDir, under)
66 if err != nil {
67 return err
73 err = removeFileAndEmptyDirs(absolutePath(filePath))
[all …]
Dcommand.go84 f, err := os.Create(absolutePath(cpuprofile))
85 if err != nil {
86 fatalf("error opening cpuprofile: %s", err)
94 f, err := os.Create(absolutePath(traceFile))
95 if err != nil {
96 fatalf("error opening trace: %s", err)
114 filesToParse, err := ctx.ListModulePaths(SrcDir)
115 if err != nil {
116 fatalf("could not enumerate files: %v\n", err.Error())
163 err := writeDocs(ctx, absolutePath(docFile))
[all …]
/build/soong/cmd/sbox/
Dsbox.go91 filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
93 relPath, err := filepath.Rel(root, path)
94 if err != nil {
96 panic(err)
131 err := os.MkdirAll(sandboxesRoot, 0777)
132 if err != nil {
133 return err
135 err = os.RemoveAll(outputRoot)
136 if err != nil {
137 return err
[all …]
/build/soong/zip/
Dzip.go78 err error member
108 if b.err != nil {
119 if b.err != nil {
130 if b.err != nil {
134 f, err := b.fs.Open(name)
135 if err != nil {
136 b.err = err
141 list, err := ioutil.ReadAll(f)
142 if err != nil {
143 b.err = err
[all …]
/build/soong/cmd/host_bionic_inject/
Dhost_bionic_inject.go42 r, err := os.Open(inputFile)
43 if err != nil {
44 fmt.Fprintln(os.Stderr, err.Error())
49 file, err := symbol_inject.OpenFile(r)
50 if err != nil {
51 fmt.Fprintln(os.Stderr, err.Error())
55 linker, err := elf.Open(linkerFile)
56 if err != nil {
57 fmt.Fprintln(os.Stderr, err.Error())
61 start_addr, err := parseElf(r, linker)
[all …]
/build/soong/cmd/path_interposer/
Dmain_test.go32 var err error
33 tmpDir, err = ioutil.TempDir("", "interposer_test")
34 if err != nil {
35 panic(err)
40 err = os.Setenv("PATH", "")
41 if err != nil {
42 panic(err)
50 f, err := ioutil.TempFile(tmpDir, "interposer")
51 if err != nil {
52 t.Fatal(err)
[all …]
/build/soong/ui/build/paths/
Dlogs.go47 d, err := os.Open(filepath.Dir(name))
48 if err != nil {
49 return "", func() {}, err
57 func tmpFallback(name string) (addr string, cleanup func(), err error) {
58 d, err := ioutil.TempDir("/tmp", "log_sock")
59 if err != nil {
69 absDir, err := filepath.Abs(dir)
70 if err != nil {
74 err = os.Symlink(absDir, filepath.Join(d, "d"))
75 if err != nil {
[all …]
/build/soong/finder/fs/
Dtest.go29 err := filesystem.WriteFile(path, []byte(content), 0777)
30 if err != nil {
31 t.Fatal(err.Error())
40 err := filesystem.Remove(path)
41 if err != nil {
42 t.Fatal(err.Error())
47 err := filesystem.RemoveAll(path)
48 if err != nil {
49 t.Fatal(err.Error())
54 err := filesystem.Rename(oldPath, newPath)
[all …]
Dfs_test.go33 …assertStat := func(t *testing.T, stat os.FileInfo, err error, wantName string, wantMode os.FileMod…
35 if err != nil {
36 t.Error(err)
47 assertErr := func(t *testing.T, err error, wantErr string) {
48 if err == nil || err.Error() != wantErr {
49 t.Errorf("want error %q, got %q", wantErr, err)
53 stat, err := filesystem.Lstat("/tmp/links/dir")
54 assertStat(t, stat, err, "dir", os.ModeSymlink)
56 stat, err = filesystem.Stat("/tmp/links/dir")
57 assertStat(t, stat, err, "realdir", os.ModeDir)
[all …]
/build/soong/cmd/fileslist/
Dfileslist.go69 f, err := os.Open(n.path)
70 if err != nil {
71 panic(err)
75 if _, err := io.Copy(h, f); err != nil {
76 panic(err)
80 s, err := os.Readlink(n.path)
81 if err != nil {
82 panic(err)
84 if _, err := io.WriteString(h, s); err != nil {
85 panic(err)
[all …]
/build/soong/android/
Dexpand_test.go42 err bool
133 err: true,
137 err: true,
141 err: true,
145 err: true,
149 err: true,
153 err: true,
157 err: true,
161 err: true,
167 got, err := Expand(test.in, func(s string) (string, error) {
[all …]
/build/soong/symbol_inject/
Dsymbol_inject.go32 file, err := elfSymbolsFromFile(r)
33 if elfError, ok := err.(cantParseError); ok {
35 file, err = machoSymbolsFromFile(r)
36 if _, ok := err.(cantParseError); ok {
38 file, err = peSymbolsFromFile(r)
39 if _, ok := err.(cantParseError); ok {
45 if err != nil {
46 return nil, err
51 return file, err
55 offset, size, err := findSymbol(file, symbol)
[all …]
/build/soong/third_party/zip/
Dreader.go50 f, err := os.Open(name)
51 if err != nil {
52 return nil, err
54 fi, err := f.Stat()
55 if err != nil {
57 return nil, err
60 if err := r.init(f, fi.Size()); err != nil {
62 return nil, err
72 if err := zr.init(r, size); err != nil {
73 return nil, err
[all …]
/build/soong/ui/logger/
Dlogger_test.go32 dir, err := ioutil.TempDir("", "test-rotation")
33 if err != nil {
34 t.Fatalf("Failed to get TempDir: %v", err)
41 f, err := CreateFileWithRotation(name, 3)
42 if err != nil {
43 t.Fatalf("Failed to create file: %v", err)
45 if n, err := io.WriteString(f, data); err == nil && n < len(data) {
47 } else if err != nil {
48 t.Fatalf("Failed to write: %v", err)
50 if err := f.Close(); err != nil {
[all …]

12345678910>>...12