/build/soong/finder/ |
D | finder_test.go | 37 func newFinder(t *testing.T, filesystem *fs.MockFs, cacheParams CacheParams) *Finder { 38 return newFinderWithNumThreads(t, filesystem, cacheParams, 2) 41 func newFinderWithNumThreads(t *testing.T, filesystem *fs.MockFs, cacheParams CacheParams, numThrea… 42 f, err := newFinderAndErr(t, filesystem, cacheParams, numThreads) 44 fatal(t, err.Error()) 49 func newFinderAndErr(t *testing.T, filesystem *fs.MockFs, cacheParams CacheParams, numThreads int) … 62 func finderWithSameParams(t *testing.T, original *Finder) *Finder { 63 f, err := finderAndErrorWithSameParams(t, original) 65 fatal(t, err.Error()) 70 func finderAndErrorWithSameParams(t *testing.T, original *Finder) (*Finder, error) { [all …]
|
/build/soong/ui/tracer/ |
D | tracer.go | 104 func (t *tracerImpl) startBuffer() { 105 t.w = nopCloser{&t.buf} 106 fmt.Fprintln(t.w, "[") 108 t.defineThread(MainThread, "main") 111 func (t *tracerImpl) close() { 112 if t.file != nil { 113 fmt.Fprintln(t.w, "]") 115 if err := t.w.Close(); err != nil { 116 t.log.Println("Error closing trace writer:", err) 119 if err := t.file.Close(); err != nil { [all …]
|
/build/soong/android/ |
D | util_test.go | 61 func TestFirstUniqueStrings(t *testing.T) { 65 t.Errorf("incorrect output:") 66 t.Errorf(" input: %#v", testCase.in) 67 t.Errorf(" expected: %#v", testCase.out) 68 t.Errorf(" got: %#v", out) 111 func TestLastUniqueStrings(t *testing.T) { 115 t.Errorf("incorrect output:") 116 t.Errorf(" input: %#v", testCase.in) 117 t.Errorf(" expected: %#v", testCase.out) 118 t.Errorf(" got: %#v", out) [all …]
|
/build/make/tools/ |
D | merge-event-log-tags.py | 82 for t in event_log_tags.TagFile(pre_merged_file).tags: 83 pre_merged_tags[t.tagname] = t 88 for t in tagfile.tags: 89 tagnum = t.tagnum 90 tagname = t.tagname 91 description = t.description 93 if t.tagname in by_tagname: 94 orig = by_tagname[t.tagname] 98 orig.tagnum = t.tagnum 99 elif t.tagnum is None: [all …]
|
/build/soong/jar/ |
D | jar_test.go | 23 func TestGetJavaPackage(t *testing.T) { 66 t.Run(tt.name, func(t *testing.T) { 70 t.Errorf("JavaPackage() error = %v, wantErr %v", err, tt.wantErr) 74 t.Errorf("JavaPackage() = %v, want %v", got, tt.want) 80 func Test_javaIdentRune(t *testing.T) { 140 check := func(t *testing.T, ch rune, i int, want bool) { 141 t.Helper() 143 t.Errorf("javaIdentRune() = %v, want %v", got, want) 147 t.Run("first", func(t *testing.T) { 148 t.Run("valid", func(t *testing.T) { [all …]
|
/build/soong/cc/ |
D | library_test.go | 24 func TestLibraryReuse(t *testing.T) { 25 t.Run("simple", func(t *testing.T) { 26 ctx := testCc(t, ` 36 t.Fatalf("unexpected inputs to libfoo shared: %#v", libfooShared.Inputs.Strings()) 40 t.Fatalf("unexpected inputs to libfoo static: %#v", libfooStatic.Inputs.Strings()) 44 t.Errorf("static object not reused for shared library") 47 t.Errorf("static object not reused for shared library") 51 t.Run("extra static source", func(t *testing.T) { 52 ctx := testCc(t, ` 65 t.Fatalf("unexpected inputs to libfoo shared: %#v", libfooShared.Inputs.Strings()) [all …]
|
D | cc_test.go | 55 func testCcWithConfig(t *testing.T, config android.Config) *android.TestContext { 56 t.Helper() 61 android.FailIfErrored(t, errs) 63 android.FailIfErrored(t, errs) 68 func testCc(t *testing.T, bp string) *android.TestContext { 69 t.Helper() 74 return testCcWithConfig(t, config) 77 func testCcNoVndk(t *testing.T, bp string) *android.TestContext { 78 t.Helper() 82 return testCcWithConfig(t, config) [all …]
|
/build/blueprint/pathtools/ |
D | fs_test.go | 49 func TestMockFs_followSymlinks(t *testing.T) { 97 t.Run(test.from, func(t *testing.T) { 100 t.Errorf("want: %v, got %v", test.to, got) 106 func runTestFs(t *testing.T, f func(t *testing.T, fs FileSystem, dir string)) { 111 run := func(t *testing.T, fs FileSystem) { 112 t.Run("relpath", func(t *testing.T) { 113 f(t, fs, "") 115 t.Run("abspath", func(t *testing.T) { 116 f(t, fs, absTestDataDir) 120 t.Run("mock", func(t *testing.T) { [all …]
|
/build/soong/apex/ |
D | apex_test.go | 49 func testApexError(t *testing.T, pattern, bp string, handlers ...testCustomizer) { 50 t.Helper() 51 ctx, config := testApexContext(t, bp, handlers...) 54 android.FailIfNoMatchingErrors(t, pattern, errs) 59 android.FailIfNoMatchingErrors(t, pattern, errs) 63 t.Fatalf("missing expected error %q (0 errors are returned)", pattern) 66 func testApex(t *testing.T, bp string, handlers ...testCustomizer) (*android.TestContext, android.C… 67 t.Helper() 68 ctx, config := testApexContext(t, bp, handlers...) 70 android.FailIfErrored(t, errs) [all …]
|
D | vndk_test.go | 11 func TestVndkApexForVndkLite(t *testing.T) { 12 ctx, _ := testApex(t, ` 52 ensureExactContents(t, ctx, "myapex", "android_common_image", []string{ 64 func TestVndkApexUsesVendorVariant(t *testing.T) { 85 ensureFileSrc := func(t *testing.T, files []fileInApex, path, src string) { 86 t.Helper() 89 ensureContains(t, f.src, src) 93 t.Fail() 96 t.Run("VNDK lib doesn't have an apex variant", func(t *testing.T) { 97 ctx, _ := testApex(t, bp) [all …]
|
/build/soong/ui/build/paths/ |
D | logs_test.go | 28 func TestSendLog(t *testing.T) { 29 t.Run("Short name", func(t *testing.T) { 32 t.Fatal(err) 37 testSendLog(t, f, getSocketAddr) 40 testLongName := func(t *testing.T, lookup socketAddrFunc) { 43 t.Fatal(err) 48 testSendLog(t, f, lookup) 52 t.Run("Long name", func(t *testing.T) { 53 testLongName(t, getSocketAddr) 57 t.Run("Long name proc fallback", func(t *testing.T) { [all …]
|
/build/soong/cc/config/ |
D | toolchain.go | 85 func (t *toolchainBase) ndkTriple() string { 145 func (t toolchainBase) ToolPath() string { 179 func LibclangRuntimeLibrary(t Toolchain, library string) string { 180 arch := t.LibclangRuntimeLibraryArch() 184 if !t.Bionic() { 190 func BuiltinsRuntimeLibrary(t Toolchain) string { 191 return LibclangRuntimeLibrary(t, "builtins") 194 func AddressSanitizerRuntimeLibrary(t Toolchain) string { 195 return LibclangRuntimeLibrary(t, "asan") 198 func HWAddressSanitizerRuntimeLibrary(t Toolchain) string { [all …]
|
D | arm64_fuchsia_device.go | 29 func (t *toolchainFuchsiaArm64) Name() string { 33 func (t *toolchainFuchsiaArm64) GccRoot() string { 37 func (t *toolchainFuchsiaArm64) GccTriple() string { 41 func (t *toolchainFuchsiaArm64) GccVersion() string { 45 func (t *toolchainFuchsiaArm64) Cflags() string { 49 func (t *toolchainFuchsiaArm64) Cppflags() string { 53 func (t *toolchainFuchsiaArm64) Ldflags() string { 57 func (t *toolchainFuchsiaArm64) IncludeFlags() string { 61 func (t *toolchainFuchsiaArm64) ToolchainCflags() string { 65 func (t *toolchainFuchsiaArm64) ClangTriple() string { [all …]
|
D | x86_64_fuchsia_device.go | 33 func (t *toolchainFuchsiaX8664) Name() string { 37 func (t *toolchainFuchsiaX8664) GccRoot() string { 41 func (t *toolchainFuchsiaX8664) GccTriple() string { 45 func (t *toolchainFuchsiaX8664) GccVersion() string { 49 func (t *toolchainFuchsiaX8664) Cflags() string { 53 func (t *toolchainFuchsiaX8664) Cppflags() string { 57 func (t *toolchainFuchsiaX8664) Ldflags() string { 61 func (t *toolchainFuchsiaX8664) IncludeFlags() string { 65 func (t *toolchainFuchsiaX8664) ClangTriple() string { 69 func (t *toolchainFuchsiaX8664) ClangCppflags() string { [all …]
|
D | x86_windows_host.go | 170 func (t *toolchainWindowsX86) Name() string { 174 func (t *toolchainWindowsX8664) Name() string { 178 func (t *toolchainWindows) GccRoot() string { 182 func (t *toolchainWindows) GccTriple() string { 186 func (t *toolchainWindows) GccVersion() string { 190 func (t *toolchainWindows) IncludeFlags() string { 194 func (t *toolchainWindowsX86) WindresFlags() string { 198 func (t *toolchainWindowsX8664) WindresFlags() string { 202 func (t *toolchainWindowsX86) ClangTriple() string { 206 func (t *toolchainWindowsX8664) ClangTriple() string { [all …]
|
/build/soong/java/ |
D | java_test.go | 103 func run(t *testing.T, ctx *android.TestContext, config android.Config) { 104 t.Helper() 111 android.FailIfErrored(t, errs) 113 android.FailIfErrored(t, errs) 116 func testJavaError(t *testing.T, pattern string, bp string) (*android.TestContext, android.Config) { 117 t.Helper() 118 return testJavaErrorWithConfig(t, pattern, testConfig(nil, bp, nil)) 121 func testJavaErrorWithConfig(t *testing.T, pattern string, config android.Config) (*android.TestCon… 122 t.Helper() 131 android.FailIfNoMatchingErrors(t, pattern, errs) [all …]
|
D | androidmk_test.go | 25 func TestRequired(t *testing.T) { 26 ctx, config := testJava(t, ` 35 entries := android.AndroidMkEntriesForTest(t, config, "", mod)[0] 40 t.Errorf("Unexpected required modules - expected: %q, actual: %q", expected, actual) 44 func TestHostdex(t *testing.T) { 45 ctx, config := testJava(t, ` 54 entriesList := android.AndroidMkEntriesForTest(t, config, "", mod) 56 t.Errorf("two entries are expected, but got %d", len(entriesList)) 63 t.Errorf("Unexpected module name - expected: %q, actual: %q", expected, actual) 70 t.Errorf("Unexpected module name - expected: %q, actual: %q", expected, actual) [all …]
|
D | app_test.go | 59 func testApp(t *testing.T, bp string) *android.TestContext { 64 run(t, ctx, config) 69 func TestApp(t *testing.T) { 71 t.Run(moduleType, func(t *testing.T) { 72 ctx := testApp(t, moduleType+` { 93 t.Errorf("expected aapt2 compile inputs expected:\n %#v\n got:\n %#v", 108 t.Errorf("expected aapt2 link implicits expected:\n %#v\n got:\n %#v", 115 func TestAppSplits(t *testing.T) { 116 ctx := testApp(t, ` 137 t.Fatal(err) [all …]
|
/build/blueprint/ |
D | module_ctx_test.go | 60 func TestAliases(t *testing.T) { 62 t.Helper() 81 t.Errorf("unexpected parse errors:") 83 t.Errorf(" %s", err) 90 t.Errorf("unexpected dep errors:") 92 t.Errorf(" %s", err) 99 t.Errorf("unexpected dep error: %s", err) 104 t.Errorf("missing dep error: %s", expectedErr) 109 t.Helper() 113 t.Run("simple", func(t *testing.T) { [all …]
|
/build/soong/ui/logger/ |
D | logger_test.go | 31 func TestCreateFileWithRotation(t *testing.T) { 34 t.Fatalf("Failed to get TempDir: %v", err) 43 t.Fatalf("Failed to create file: %v", err) 46 t.Fatalf("Short write") 48 t.Fatalf("Failed to write: %v", err) 51 t.Fatalf("Failed to close: %v", err) 63 t.Fatalf("Failed to open dir: %v", err) 67 t.Fatalf("Failed to read dir: %v", err) 72 t.Errorf("File list does not match.") 73 t.Errorf(" got: %v", names) [all …]
|
/build/blueprint/microfactory/ |
D | microfactory_test.go | 28 func TestSimplePackagePathMap(t *testing.T) { 29 t.Parallel() 39 t.Fatal(err) 44 t.Errorf("Unexpected values in .pkgs:\nwant: %v\n got: %v", 56 t.Error("Unexpected error in pkgMap.Path(soong):", err) 58 t.Error("Expected a result from pkgMap.Path(soong)") 65 t.Error("Unexpected error in pkgMap.Path(blueprint):", err) 67 t.Error("Expected a result from pkgMap.Path(blueprint)") 73 func TestBadPackagePathMap(t *testing.T) { 74 t.Parallel() [all …]
|
/build/soong/bpfix/bpfix/ |
D | bpfix_test.go | 55 func implFilterListTest(t *testing.T, local_include_dirs []string, export_include_dirs []string, ex… 59 t.Error("failed to build tree") 61 t.Error(err) 63 t.Fatalf("%d parse errors", len(errs)) 71 t.Fatal(err) 94 t.Fatal(errorHeader + "property not found") 99 t.Fatalf("%sproperty is not a list: %v", errorHeader, listResult) 103 t.Fatalf("%sproperty exists: %v", errorHeader, listResult) 114 t.Fatalf("%s%q\nlists are different", errorHeader, actualValues) 118 func TestSimplifyKnownVariablesDuplicatingEachOther(t *testing.T) { [all …]
|
/build/soong/third_party/zip/ |
D | zip_test.go | 21 func TestOver65kFiles(t *testing.T) { 23 t.Skip("skipping in short mode") 34 t.Fatalf("creating file %d: %v", i, err) 38 t.Fatalf("Writer.Close: %v", err) 43 t.Fatalf("NewReader: %v", err) 46 t.Fatalf("File contains %d files, want %d", got, nFiles) 51 t.Fatalf("File(%d) = %q, want %q", i, zr.File[i].Name, want) 56 func TestModTime(t *testing.T) { 62 t.Errorf("times don't match: got %s, want %s", outTime, testTime) 66 …undTrip(fh *FileHeader, wantUncompressedSize uint32, wantUncompressedSize64 uint64, t *testing.T) { [all …]
|
/build/soong/etc/ |
D | prebuilt_etc_test.go | 52 func testPrebuiltEtc(t *testing.T, bp string) (*android.TestContext, android.Config) { 70 android.FailIfErrored(t, errs) 72 android.FailIfErrored(t, errs) 77 func TestPrebuiltEtcVariants(t *testing.T) { 78 ctx, _ := testPrebuiltEtc(t, ` 97 t.Errorf("expected 1, got %#v", foo_variants) 102 t.Errorf("expected 2, got %#v", bar_variants) 107 t.Errorf("expected 1, got %#v", bar_variants) 111 func TestPrebuiltEtcOutputPath(t *testing.T) { 112 ctx, _ := testPrebuiltEtc(t, ` [all …]
|
/build/soong/ui/build/ |
D | config_test.go | 41 func TestConfigParseArgsJK(t *testing.T) { 83 t.Run(strings.Join(tc.args, " "), func(t *testing.T) { 85 t.Fatal(err) 95 t.Errorf("for %q, parallel:\nwant: %d\n got: %d\n", 100 t.Errorf("for %q, keep going:\nwant: %d\n got: %d\n", 105 t.Errorf("for %q, remaining arguments:\nwant: %q\n got: %q\n", 113 func TestConfigParseArgsVars(t *testing.T) { 157 t.Run(strings.Join(tc.args, " "), func(t *testing.T) { 159 t.Fatal(err) 169 t.Errorf("for env=%q args=%q, environment:\nwant: %q\n got: %q\n", [all …]
|