Home
last modified time | relevance | path

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

12345678910>>...14

/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.go117 err := nw.Comment(p.Comment)
118 if err != nil {
119 return err
123 err := nw.Pool(name)
124 if err != nil {
125 return err
159 value, err := parseNinjaString(scope, params.Command)
160 if err != nil {
161 return nil, fmt.Errorf("error parsing Command param: %s", err)
166 value, err = parseNinjaString(scope, params.Depfile)
[all …]
Dninja_writer.go79 _, err := n.writer.WriteString(line)
80 if err != nil {
81 return err
89 _, err := n.writer.WriteString("# ")
90 if err != nil {
91 return err
93 _, err = n.writer.WriteString(line)
94 if err != nil {
95 return err
97 _, err = n.writer.WriteString("\n")
[all …]
/build/soong/cmd/sbox/
Dsbox.go88 filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
90 relPath, err := filepath.Rel(root, path)
91 if err != nil {
93 panic(err)
115 manifest, err := readManifest(manifestFile)
122 err = os.MkdirAll(sandboxesRoot, 0777)
123 if err != nil {
124 return fmt.Errorf("failed to create %q: %w", sandboxesRoot, err)
138 err = os.RemoveAll(tempDir)
139 if err != nil {
[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/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/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/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 …]
/build/make/tools/rbcrun/
Dhost_test.go66 if err := os.Chdir(dataDir()); err != nil {
67 t.Fatal(err)
93 if _, err := starlark.ExecFile(thread, filename, nil, builtins); err != nil {
94 if err, ok := err.(*starlark.EvalError); ok {
95 t.Fatal(err.Backtrace())
97 t.Fatal(err)
103 if err := os.Setenv("TEST_ENVIRONMENT_FOO", "test_environment_foo"); err != nil {
104 t.Fatal(err)
107 if _, err := starlark.ExecFile(thread, "cli_and_env.star", nil, builtins); err != nil {
108 if err, ok := err.(*starlark.EvalError); ok {
[all …]
/build/blueprint/pathtools/
Dglob.go65 buf, err := json.Marshal(multipleMatches)
66 if err != nil {
67 panic(fmt.Errorf("failed to marshal glob results to json: %w", err))
103 matches, deps, err := glob(fs, pattern, false, follow)
105 if err != nil {
106 return GlobResult{}, err
109 matches, err = filterExcludes(matches, excludes)
110 if err != nil {
111 return GlobResult{}, err
130 info, err = fs.Lstat(match)
[all …]
/build/soong/zip/
Dzip.go79 err error member
109 if b.err != nil {
120 if b.err != nil {
132 if b.err != nil {
136 f, err := b.fs.Open(name)
137 if err != nil {
138 b.err = err
143 list, err := ioutil.ReadAll(f)
144 if err != nil {
145 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 startAddr, 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/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/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/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/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/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>>...14