/build/soong/finder/ |
D | finder_test.go | 34 func newFinder(t *testing.T, filesystem *fs.MockFs, cacheParams CacheParams) *Finder { 35 return newFinderWithNumThreads(t, filesystem, cacheParams, 2) 38 func newFinderWithNumThreads(t *testing.T, filesystem *fs.MockFs, cacheParams CacheParams, numThrea… 39 f, err := newFinderAndErr(t, filesystem, cacheParams, numThreads) 41 t.Fatal(err.Error()) 46 func newFinderAndErr(t *testing.T, filesystem *fs.MockFs, cacheParams CacheParams, numThreads int) … 59 func finderWithSameParams(t *testing.T, original *Finder) *Finder { 60 f, err := finderAndErrorWithSameParams(t, original) 62 t.Fatal(err.Error()) 67 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 | 62 func TestFirstUniqueStrings(t *testing.T) { 63 f := func(t *testing.T, imp func([]string) []string, in, want []string) { 64 t.Helper() 67 t.Errorf("incorrect output:") 68 t.Errorf(" input: %#v", in) 69 t.Errorf(" expected: %#v", want) 70 t.Errorf(" got: %#v", out) 75 t.Run("list", func(t *testing.T) { 76 f(t, firstUniqueStringsList, testCase.in, testCase.out) 78 t.Run("map", func(t *testing.T) { [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/java/ |
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 | java_test.go | 109 func run(t *testing.T, ctx *android.TestContext, config android.Config) { 110 t.Helper() 117 android.FailIfErrored(t, errs) 119 android.FailIfErrored(t, errs) 122 func testJavaError(t *testing.T, pattern string, bp string) (*android.TestContext, android.Config) { 123 t.Helper() 124 return testJavaErrorWithConfig(t, pattern, testConfig(nil, bp, nil)) 127 func testJavaErrorWithConfig(t *testing.T, pattern string, config android.Config) (*android.TestCon… 128 t.Helper() 137 android.FailIfNoMatchingErrors(t, pattern, errs) [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/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 …]
|
/build/soong/etc/ |
D | prebuilt_etc_test.go | 52 func testPrebuiltEtcContext(t *testing.T, bp string) (*android.TestContext, android.Config) { 74 func testPrebuiltEtc(t *testing.T, bp string) (*android.TestContext, android.Config) { 75 t.Helper() 77 ctx, config := testPrebuiltEtcContext(t, bp) 79 android.FailIfErrored(t, errs) 81 android.FailIfErrored(t, errs) 86 func testPrebuiltEtcError(t *testing.T, pattern, bp string) { 87 t.Helper() 89 ctx, config := testPrebuiltEtcContext(t, bp) 92 android.FailIfNoMatchingErrors(t, pattern, errs) [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/rust/ |
D | rust_test.go | 74 func testRust(t *testing.T, bp string) *android.TestContext { 75 return testRustContext(t, bp, false) 78 func testRustCov(t *testing.T, bp string) *android.TestContext { 79 return testRustContext(t, bp, true) 82 func testRustContext(t *testing.T, bp string, coverage bool) *android.TestContext { 85 t.Skip("Only the Linux toolchain is supported for Rust") 88 t.Helper() 101 android.FailIfErrored(t, errs) 103 android.FailIfErrored(t, errs) 108 func testRustError(t *testing.T, pattern string, bp string) { [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/soong/finder/fs/ |
D | test.go | 26 func Write(t *testing.T, path string, content string, filesystem *MockFs) { 31 t.Fatal(err.Error()) 35 func Create(t *testing.T, path string, filesystem *MockFs) { 36 Write(t, path, "hi", filesystem) 39 func Delete(t *testing.T, path string, filesystem *MockFs) { 42 t.Fatal(err.Error()) 46 func RemoveAll(t *testing.T, path string, filesystem *MockFs) { 49 t.Fatal(err.Error()) 53 func Move(t *testing.T, oldPath string, newPath string, filesystem *MockFs) { 56 t.Fatal(err.Error()) [all …]
|
D | fs_test.go | 22 func TestMockFs_LstatStatSymlinks(t *testing.T) { 25 Create(t, "/tmp/realdir/hi.txt", filesystem) 26 Create(t, "/tmp/realdir/ignoreme.txt", filesystem) 28 Link(t, "/tmp/links/dir", "../realdir", filesystem) 29 Link(t, "/tmp/links/file", "../realdir/hi.txt", filesystem) 30 Link(t, "/tmp/links/broken", "nothingHere", filesystem) 31 Link(t, "/tmp/links/recursive", "recursive", filesystem) 33 …assertStat := func(t *testing.T, stat os.FileInfo, err error, wantName string, wantMode os.FileMod… 34 t.Helper() 36 t.Error(err) [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 …]
|