Home
last modified time | relevance | path

Searched refs:w (Results 1 – 25 of 91) sorted by relevance

1234

/build/blueprint/
Dninja_writer_test.go30 input func(w *ninjaWriter)
34 input: func(w *ninjaWriter) {
35 ck(w.Comment("foo"))
40 input: func(w *ninjaWriter) {
41 ck(w.Pool("foo"))
46 input: func(w *ninjaWriter) {
47 ck(w.Rule("foo"))
52 input: func(w *ninjaWriter) {
53 ck(w.Build("foo comment", "foo", testNinjaStrings("o1", "o2"),
61 input: func(w *ninjaWriter) {
[all …]
Dmodule_ctx_test.go146 if g, w := foo.forwardDeps, []*moduleInfo{barB}; !reflect.DeepEqual(g, w) {
147 t.Fatalf("expected foo deps to be %q, got %q", w, g)
166 if g, w := foo.forwardDeps, []*moduleInfo{barBB}; !reflect.DeepEqual(g, w) {
167 t.Fatalf("expected foo deps to be %q, got %q", w, g)
186 if g, w := foo.forwardDeps, []*moduleInfo{barAB}; !reflect.DeepEqual(g, w) {
187 t.Fatalf("expected foo deps to be %q, got %q", w, g)
273 if g, w := foo.forwardDeps, []*moduleInfo{barB}; !reflect.DeepEqual(g, w) {
274 t.Fatalf("expected foo deps to be %q, got %q", w, g)
293 if g, w := foo.forwardDeps, []*moduleInfo{barBB}; !reflect.DeepEqual(g, w) {
294 t.Fatalf("expected foo deps to be %q, got %q", w, g)
[all …]
/build/soong/third_party/zip/
Dwriter.go33 func NewWriter(w io.Writer) *Writer {
34 return &Writer{cw: &countWriter{w: bufio.NewWriter(w)}}
41 func (w *Writer) SetOffset(n int64) {
42 if w.cw.count != 0 {
45 w.cw.count = n
50 func (w *Writer) Flush() error {
51 return w.cw.w.(*bufio.Writer).Flush()
56 func (w *Writer) Close() error {
57 if w.last != nil && !w.last.closed {
58 if err := w.last.close(); err != nil {
[all …]
Dandroid.go25 func (w *Writer) CopyFrom(orig *File, newName string) error {
26 if w.last != nil && !w.last.closed {
27 if err := w.last.close(); err != nil {
30 w.last = nil
43 offset: uint64(w.cw.count),
45 w.dir = append(w.dir, h)
56 if err := writeHeader(w.cw, fh); err != nil {
63 io.Copy(w.cw, io.NewSectionReader(orig.zipr, dataOffset, int64(orig.CompressedSize64)))
83 _, err = w.cw.Write(buf)
131 func (w *Writer) CreateCompressedHeader(fh *FileHeader) (io.WriteCloser, error) {
[all …]
Dregister.go20 type Compressor func(w io.Writer) (io.WriteCloser, error)
31 func newFlateWriter(w io.Writer) io.WriteCloser {
34 fw.Reset(w)
36 fw, _ = flate.NewWriter(w, 5)
46 func (w *pooledFlateWriter) Write(p []byte) (n int, err error) {
47 w.mu.Lock()
48 defer w.mu.Unlock()
49 if w.fw == nil {
52 return w.fw.Write(p)
55 func (w *pooledFlateWriter) Close() error {
[all …]
Dandroid_test.go86 w, err := fromZip.CreateHeaderAndroid(&FileHeader{
95 _, err = w.Write(make([]byte, size))
135 if g, w := toZipReader.File[0].CompressedSize64, uint64(size); g != w {
136 t.Errorf("Expected CompressedSize64 %d, got %d", w, g)
139 if g, w := toZipReader.File[0].UncompressedSize64, uint64(size); g != w {
140 t.Errorf("Expected UnompressedSize64 %d, got %d", w, g)
189 if g, w := d.directoryRecords, uint64(1); g != w {
190 t.Errorf("wanted directoryRecords %d, got %d", w, g)
193 if g, w := d.directorySize, uint64(uint32max); g != w {
194 t.Errorf("wanted directorySize %d, got %d", w, g)
[all …]
Dwriter_test.go70 w := NewWriter(buf)
73 testCreate(t, w, &wt)
76 if err := w.Close(); err != nil {
104 w := NewWriter(buf)
105 w.SetOffset(int64(n))
108 testCreate(t, w, &wt)
111 if err := w.Close(); err != nil {
127 w := NewWriter(struct{ io.Writer }{&buf})
128 _, err := w.Create("foo")
135 if err := w.Flush(); err != nil {
[all …]
Dexample_test.go22 w := zip.NewWriter(buf)
33 f, err := w.Create(file.Name)
44 err := w.Close()
85 w := zip.NewWriter(buf)
88 w.RegisterCompressor(zip.Deflate, func(out io.Writer) (io.WriteCloser, error) {
/build/soong/apex/
Dandroidmk.go76 func (a *apexBundle) androidMkForFiles(w io.Writer, apexBundleName, apexName, moduleDir string,
144 fmt.Fprintln(w, "\ninclude $(CLEAR_VARS)")
146 fmt.Fprintln(w, "LOCAL_PATH :=", fi.moduleDir)
148 fmt.Fprintln(w, "LOCAL_PATH :=", moduleDir)
150 fmt.Fprintln(w, "LOCAL_MODULE :=", moduleName)
152 fmt.Fprintln(w, "LOCAL_MODULE_OWNER :=", fi.module.Owner())
160 fmt.Fprintln(w, "LOCAL_MODULE_PATH :=", modulePath)
162 fmt.Fprintln(w, "LOCAL_SOONG_SYMBOL_PATH :=", pathWhenActivated)
165 fmt.Fprintln(w, "LOCAL_MODULE_SYMLINKS :=", strings.Join(fi.symlinks, " "))
176 … fmt.Fprintln(w, "LOCAL_TEST_DATA :=", strings.Join(android.AndroidMkDataPaths(newDataPaths), " "))
[all …]
/build/soong/android/
Ddeptag_test.go98 if g, w := hostFoo.Implicits.Strings(), hostInstallDep.Output.String(); !InList(w, g) {
99 t.Errorf("expected host dependency %q, got %q", w, g)
102 if g, w := hostFoo.Implicits.Strings(), hostTransitive.Output.String(); !InList(w, g) {
103 t.Errorf("expected host dependency %q, got %q", w, g)
106 if g, w := hostInstallDep.Implicits.Strings(), hostTransitive.Output.String(); !InList(w, g) {
107 t.Errorf("expected host dependency %q, got %q", w, g)
110 if g, w := hostFoo.Implicits.Strings(), hostDep.Output.String(); InList(w, g) {
111 t.Errorf("expected no host dependency %q, got %q", w, g)
119 if g, w := deviceFoo.OrderOnly.Strings(), deviceInstallDep.Output.String(); !InList(w, g) {
120 t.Errorf("expected device dependency %q, got %q", w, g)
[all …]
Darch_test.go369 if g, w := enabledVariants(ctx, "foo"), tt.fooVariants; !reflect.DeepEqual(w, g) {
370 t.Errorf("want foo variants:\n%q\ngot:\n%q\n", w, g)
373 if g, w := enabledVariants(ctx, "bar"), tt.barVariants; !reflect.DeepEqual(w, g) {
374 t.Errorf("want bar variants:\n%q\ngot:\n%q\n", w, g)
377 if g, w := enabledVariants(ctx, "baz"), tt.bazVariants; !reflect.DeepEqual(w, g) {
378 t.Errorf("want baz variants:\n%q\ngot:\n%q\n", w, g)
381 if g, w := enabledVariants(ctx, "qux"), tt.quxVariants; !reflect.DeepEqual(w, g) {
382 t.Errorf("want qux variants:\n%q\ngot:\n%q\n", w, g)
462 if g, w := enabledVariants(ctx, "foo"), tt.fooVariants; !reflect.DeepEqual(w, g) {
463 t.Errorf("want foo variants:\n%q\ngot:\n%q\n", w, g)
[all …]
/build/soong/rust/
Dprotobuf_test.go52 if w := "protoc-gen-rust"; !strings.Contains(cmd, w) {
53 t.Errorf("expected %q in %q", w, cmd)
57 if w := "-Ishared_include"; !strings.Contains(cmd, w) {
58 t.Errorf("expected %q in %q", w, cmd)
60 if w := "-Istatic_include"; !strings.Contains(cmd, w) {
61 t.Errorf("expected %q in %q", w, cmd)
99 if w := "protoc-gen-grpc"; !strings.Contains(cmd, w) {
100 t.Errorf("expected %q in %q", w, cmd)
104 if w := "-I" + rustDefaultsDir + "libprotobuf-cpp-full-includes"; !strings.Contains(cmd, w) {
105 t.Errorf("expected %q in %q", w, cmd)
/build/soong/bpf/
Dbpf.go119 Custom: func(w io.Writer, name, prefix, moduleDir string, data android.AndroidMkData) {
121 fmt.Fprintln(w)
122 fmt.Fprintln(w, "LOCAL_PATH :=", moduleDir)
123 fmt.Fprintln(w)
127 fmt.Fprintln(w, "include $(CLEAR_VARS)")
128 fmt.Fprintln(w, "LOCAL_MODULE := ", objName)
129 data.Entries.WriteLicenseVariables(w)
130 fmt.Fprintln(w, "LOCAL_PREBUILT_MODULE_FILE :=", obj.String())
131 fmt.Fprintln(w, "LOCAL_MODULE_STEM :=", obj.Base())
132 fmt.Fprintln(w, "LOCAL_MODULE_CLASS := ETC")
[all …]
/build/soong/phony/
Dphony.go51 Custom: func(w io.Writer, name, prefix, moduleDir string, data android.AndroidMkData) {
52 fmt.Fprintln(w, "\ninclude $(CLEAR_VARS)")
53 fmt.Fprintln(w, "LOCAL_PATH :=", moduleDir)
54 fmt.Fprintln(w, "LOCAL_MODULE :=", name)
55 data.Entries.WriteLicenseVariables(w)
57 fmt.Fprintln(w, "LOCAL_IS_HOST_MODULE := true")
60 fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES :=",
64 fmt.Fprintln(w, "LOCAL_HOST_REQUIRED_MODULES :=",
68 fmt.Fprintln(w, "LOCAL_TARGET_REQUIRED_MODULES :=",
71 fmt.Fprintln(w, "include $(BUILD_PHONY_PACKAGE)")
/build/soong/ui/status/
Dlog.go34 w io.WriteCloser member
48 w := gzip.NewWriter(f)
51 w: w,
63 fmt.Fprintf(v.w, "[%d/%d] %s\n", counts.FinishedActions, counts.TotalActions, cmd)
66 fmt.Fprintf(v.w, "FAILED: %s\n", strings.Join(result.Outputs, " "))
70 fmt.Fprintln(v.w, result.Output)
75 v.w.Close()
79 fmt.Fprintf(v.w, "%s%s\n", level.Prefix(), message)
83 fmt.Fprint(v.w, string(p))
88 w io.WriteCloser member
[all …]
/build/make/tools/rbcrun/testdata/
Dregex.star7 for w in ("foobar", "fooxbar", "abcxd", "123"):
8 assert.true(rblf_regex(pattern, w), "%s should match %s" % (w, pattern))
9 for w in ("afoobar", "abcde"):
10 assert.true(not rblf_regex(pattern, w), "%s should not match %s" % (w, pattern))
/build/soong/java/
Ddroiddoc_test.go84 …if g, w := android.PathsRelativeToTop(javaDoc.Implicits), android.PathRelativeToTop(barStubsOutput…
85 t.Errorf("implicits of bar-doc must contain %q, but was %q.", w, g)
94 …if g, w := android.PathsRelativeToTop(javaDoc.Implicits), android.PathRelativeToTop(aidl.Output); …
95 t.Errorf("implicits of bar-doc must contain %q, but was %q.", w, g)
98 …if g, w := aidl.Implicits.Strings(), []string{"bar-doc/IBar.aidl", "bar-doc/IFoo.aidl"}; !reflect.…
99 t.Errorf("aidl inputs must be %q, but was %q", w, g)
Dandroidmk.go284 func(w io.Writer, name, prefix, moduleDir string) {
285 fmt.Fprintln(w, "jar_installed_module := $(LOCAL_INSTALLED_MODULE)")
306 func(w io.Writer, name, prefix, moduleDir string) {
308 fmt.Fprintln(w, "$(LOCAL_INSTALLED_MODULE): $(jar_installed_module)")
309 fmt.Fprintln(w, "jar_installed_module :=")
413 func(w io.Writer, name, prefix, moduleDir string) {
415 fmt.Fprintf(w, "$(call dist-for-goals,%s,%s:%s)\n",
419 fmt.Fprintf(w, "$(call dist-for-goals,%s,%s:%s)\n",
423 fmt.Fprintf(w, "$(call dist-for-goals,%s,%s:%s)\n",
570 func(w io.Writer, name, prefix, moduleDir string) {
[all …]
Drobolectric.go275 func(w io.Writer, name, prefix, moduleDir string) {
281 r.writeTestRunner(w, name, "Run"+name+strconv.Itoa(i), shard)
285 fmt.Fprintln(w, "")
286 fmt.Fprintln(w, ".PHONY:", "Run"+name)
287 fmt.Fprintln(w, "Run"+name, ": \\")
289 fmt.Fprintln(w, " ", "Run"+name+strconv.Itoa(i), "\\")
291 fmt.Fprintln(w, "")
293 r.writeTestRunner(w, name, "Run"+name, r.tests)
301 func (r *robolectricTest) writeTestRunner(w io.Writer, module, name string, tests []string) {
302 fmt.Fprintln(w, "")
[all …]
/build/soong/cc/
Dproto_test.go60 if w := "--foobar_out="; !strings.Contains(cmd, w) {
61 t.Errorf("expected %q in %q", w, cmd)
66 if w := "--plugin=protoc-gen-foobar=" + foobarPath; !strings.Contains(cmd, w) {
67 t.Errorf("expected %q in %q", w, cmd)
/build/soong/ui/terminal/
Dstatus.go29 func NewStatusOutput(w io.Writer, statusFormat string, forceSimpleOutput, quietBuild bool) status.S…
32 if !forceSimpleOutput && isSmartTerminal(w) {
33 return NewSmartStatusOutput(w, formatter)
35 return NewSimpleStatusOutput(w, formatter)
Dutil.go25 func isSmartTerminal(w io.Writer) bool {
26 if f, ok := w.(*os.File); ok {
35 } else if _, ok := w.(*fakeSmartTerminal); ok {
41 func termSize(w io.Writer) (width int, height int, ok bool) {
42 if f, ok := w.(*os.File); ok {
51 } else if f, ok := w.(*fakeSmartTerminal); ok {
/build/soong/cmd/diff_target_files/
Dallow_list.go56 for _, w := range newAllowlists {
57 add(w.path, w.ignoreMatchingLines)
92 for _, w := range jsonAllowLists {
93 for _, p := range w.Paths {
96 ignoreMatchingLines: w.IgnoreMatchingLines,
107 for _, w := range allowLists {
108 if match, err := Match(w.path, l[i][0].Name); err != nil {
111 … if match, err := diffIgnoringMatchingLines(l[i][0], l[i][1], w.ignoreMatchingLines); err != nil {
113 } else if match || len(w.ignoreMatchingLines) == 0 {
132 for _, w := range allowLists {
[all …]
/build/soong/finder/fs/
Dfs_test.go39 if g, w := stat.Name(), wantName; g != w {
40 t.Errorf("want name %q, got %q", w, g)
42 if g, w := stat.Mode(), wantMode; g != w {
43 t.Errorf("%s: want mode %q, got %q", wantName, w, g)
/build/soong/ui/tracer/
Dtracer.go62 w io.WriteCloser member
105 t.w = nopCloser{&t.buf}
106 fmt.Fprintln(t.w, "[")
113 fmt.Fprintln(t.w, "]")
115 if err := t.w.Close(); err != nil {
147 t.w = gzip.NewWriter(f)
150 if _, err := io.Copy(t.w, &t.buf); err != nil {
181 fmt.Fprintln(t.w, ",")
186 if _, err = t.w.Write(bytes); err != nil {

1234