Home
last modified time | relevance | path

Searched refs:err (Results 1 – 25 of 277) 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.go114 err := nw.Comment(p.Comment)
115 if err != nil {
116 return err
120 err := nw.Pool(name)
121 if err != nil {
122 return err
156 value, err := parseNinjaString(scope, params.Command)
157 if err != nil {
158 return nil, fmt.Errorf("error parsing Command param: %s", err)
163 value, err = parseNinjaString(scope, params.Depfile)
[all …]
Dpackage_ctx.go104 err := validateNinjaName(pkgName)
105 if err != nil {
106 panic(err)
224 err := p.scope.AddImport(importPkg.shortName, importPkg.scope)
225 if err != nil {
226 panic(err)
240 err := validateNinjaName(as)
241 if err != nil {
242 panic(err)
245 err = p.scope.AddImport(as, importPkg.scope)
[all …]
/build/soong/bpfix/cmd/
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 …]
Dwhitelist.go56 newWhitelists, err := parseWhitelistFile(file)
57 if err != nil {
58 return nil, err
79 r, err := os.Open(file)
80 if err != nil {
81 return nil, err
89 err = d.Decode(&jsonWhitelists)
101 return whitelists, err
108 if match, err := Match(w.path, l[i][0].Name); err != nil {
109 return l, err
[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/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/pathtools/
Dglob.go42 …ttern string, excludes []string, follow ShouldFollowSymlinks) (matches, deps []string, err error) {
47 follow ShouldFollowSymlinks) (matches, deps []string, err error) {
52 matches, deps, err = glob(fs, pattern, false, follow)
55 if err != nil {
56 return nil, nil, err
59 matches, err = filterExcludes(matches, excludes)
60 if err != nil {
61 return nil, nil, err
78 isSymlink, err := fs.IsSymlink(match)
79 if err != nil {
[all …]
/build/kati/
Dfunc.go112 n, err := strconv.Atoi(v)
113 if err != nil || n < 0 {
173 err := assertArity("subst", 3, len(f.args))
174 if err != nil {
175 return err
178 fargs, err := ev.args(abuf, f.args[1:]...)
179 if err != nil {
180 return err
202 err := assertArity("patsubst", 3, len(f.args))
203 if err != nil {
[all …]
Dserialize.go68 err error member
72 if d.err != nil {
76 d.err = binary.Write(&d.w, binary.LittleEndian, &v)
80 if d.err != nil {
84 if d.err != nil {
87 _, d.err = io.WriteString(&d.w, s)
91 if d.err != nil {
95 if d.err != nil {
98 _, d.err = d.w.Write(b)
102 if d.err != nil {
[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(filePath)
[all …]
Dcommand.go80 f, err := os.Create(cpuprofile)
81 if err != nil {
82 fatalf("error opening cpuprofile: %s", err)
90 f, err := os.Create(traceFile)
91 if err != nil {
92 fatalf("error opening trace: %s", err)
110 filesToParse, err := ctx.ListModulePaths(SrcDir)
111 if err != nil {
112 fatalf("could not enumerate files: %v\n", err.Error())
158 err := writeDocs(ctx, docFile)
[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/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/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/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/
Dexample_test.go33 f, err := w.Create(file.Name)
34 if err != nil {
35 log.Fatal(err)
37 _, err = f.Write([]byte(file.Body))
38 if err != nil {
39 log.Fatal(err)
44 err := w.Close()
45 if err != nil {
46 log.Fatal(err)
52 r, err := zip.OpenReader("testdata/readme.zip")
[all …]
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/build/
Dfinder.go39 dir, err := os.Getwd()
40 if err != nil {
41 ctx.Fatalf("No working directory for module-finder: %v", err.Error())
72 f, err = finder.New(cacheParams, filesystem, logger.New(ioutil.Discard),
74 if err != nil {
75 ctx.Fatalf("Could not create module-finder: %v", err)
89 err := dumpListToFile(androidMks, filepath.Join(dumpDir, "Android.mk.list"))
90 if err != nil {
91 ctx.Fatalf("Could not export module list: %v", err)
97 err = dumpListToFile(androidProductsMks, filepath.Join(dumpDir, "AndroidProducts.mk.list"))
[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/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 …]
/build/soong/cmd/sbox/
Dsbox.go85 filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
87 relPath, err := filepath.Rel(root, path)
88 if err != nil {
90 panic(err)
125 err := os.MkdirAll(sandboxesRoot, 0777)
126 if err != nil {
127 return err
129 err = os.RemoveAll(outputRoot)
130 if err != nil {
131 return err
[all …]

12345678910>>...12