Home
last modified time | relevance | path

Searched refs:t (Results 1 – 25 of 350) sorted by relevance

12345678910>>...14

/build/soong/finder/
Dfinder_test.go35 func newFinder(t *testing.T, filesystem *fs.MockFs, cacheParams CacheParams) *Finder {
36 return newFinderWithNumThreads(t, filesystem, cacheParams, 2)
39 func newFinderWithNumThreads(t *testing.T, filesystem *fs.MockFs, cacheParams CacheParams, numThrea…
40 f, err := newFinderAndErr(t, filesystem, cacheParams, numThreads)
42 t.Fatal(err.Error())
47 func newFinderAndErr(t *testing.T, filesystem *fs.MockFs, cacheParams CacheParams, numThreads int) …
60 func finderWithSameParams(t *testing.T, original *Finder) *Finder {
61 f, err := finderAndErrorWithSameParams(t, original)
63 t.Fatal(err.Error())
68 func finderAndErrorWithSameParams(t *testing.T, original *Finder) (*Finder, error) {
[all …]
/build/soong/android/
Dtest_asserts.go28 func AssertSame(t *testing.T, message string, expected interface{}, actual interface{}) {
29 t.Helper()
31 t.Errorf("%s: expected:\n%#v\nactual:\n%#v", message, expected, actual)
37 func AssertBoolEquals(t *testing.T, message string, expected bool, actual bool) {
38 t.Helper()
40 t.Errorf("%s: expected %t, actual %t", message, expected, actual)
46 func AssertIntEquals(t *testing.T, message string, expected int, actual int) {
47 t.Helper()
49 t.Errorf("%s: expected %d, actual %d", message, expected, actual)
55 func AssertStringEquals(t *testing.T, message string, expected string, actual string) {
[all …]
Dutil_test.go63 func TestFirstUniqueStrings(t *testing.T) {
64 f := func(t *testing.T, imp func([]string) []string, in, want []string) {
65 t.Helper()
68 t.Errorf("incorrect output:")
69 t.Errorf(" input: %#v", in)
70 t.Errorf(" expected: %#v", want)
71 t.Errorf(" got: %#v", out)
76 t.Run("list", func(t *testing.T) {
77 f(t, firstUniqueStringsList, testCase.in, testCase.out)
79 t.Run("map", func(t *testing.T) {
[all …]
Dconfig_test.go61 func TestValidateConfigAnnotations(t *testing.T) {
68 t.Errorf("Incorrect error; expected:\n"+
77 func TestProductConfigAnnotations(t *testing.T) {
80 t.Errorf(err.Error())
84 func TestMissingVendorConfig(t *testing.T) {
87 t.Errorf("Expected false")
91 func verifyProductVariableMarshaling(t *testing.T, v productVariables) {
92 dir := t.TempDir()
96 t.Errorf("Couldn't save default product config: %q", err)
102 t.Errorf("Couldn't load default product config: %q", err)
[all …]
Dfixture_test.go23 func TestFixtureDedup(t *testing.T) {
46 GroupFixturePreparers(extension, preparer1, preparer2, preparer2Then1, preparer3).Fixture(t)
48 AssertDeepEquals(t, "preparers called in wrong order",
52 func TestFixtureValidateMockFS(t *testing.T) {
53 t.Run("absolute path", func(t *testing.T) {
54 …AssertPanicMessageContains(t, "source path validation failed", "Path is outside directory: /abs/pa…
55 FixtureAddFile("/abs/path/Android.bp", nil).Fixture(t)
58 t.Run("not canonical", func(t *testing.T) {
59 …AssertPanicMessageContains(t, "source path validation failed", `path "path/with/../in/it/Android.b…
60 FixtureAddFile("path/with/../in/it/Android.bp", nil).Fixture(t)
[all …]
/build/soong/ui/tracer/
Dtracer.go104 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/make/tools/
Dmerge-event-log-tags.py82 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/
Djar_test.go23 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/
Dlibrary_test.go24 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 …]
Dcc_test.go47 func testCcWithConfig(t *testing.T, config android.Config) *android.TestContext {
48 t.Helper()
49 result := prepareForCcTest.RunTestWithConfig(t, config)
64 func testCc(t *testing.T, bp string) *android.TestContext {
65 t.Helper()
66 result := prepareForCcTest.RunTestWithBp(t, bp)
75 func testCcNoVndk(t *testing.T, bp string) *android.TestContext {
76 t.Helper()
77 config := TestConfig(t.TempDir(), android.Android, nil, bp, nil)
80 return testCcWithConfig(t, config)
[all …]
/build/soong/rust/
Dproject_json_test.go30 func testProjectJson(t *testing.T, bp string) []byte {
34 ).RunTestWithBp(t, bp)
41 t.Errorf("rust-project.json has not been generated")
51 func validateJsonCrates(t *testing.T, rawContent []byte) []interface{} {
55 t.Errorf("Unable to parse the rust-project.json as JSON: %v", err)
59 t.Errorf("Unexpected JSON format: %v", content)
62 t.Errorf("No crates attribute in rust-project.json: %v", root)
66 t.Errorf("Unexpected crates format: %v", root["crates"])
72 func validateCrate(t *testing.T, crate interface{}) map[string]interface{} {
75 t.Fatalf("Unexpected type for crate: %v", c)
[all …]
/build/soong/apex/
Dapex_test.go51 func testApexError(t *testing.T, pattern, bp string, preparers ...android.FixturePreparer) {
52 t.Helper()
58 RunTestWithBp(t, bp)
61 func testApex(t *testing.T, bp string, preparers ...android.FixturePreparer) *android.TestContext {
62 t.Helper()
73 ).RunTest(t)
228 func ensureEquals(t *testing.T, result string, expected string) {
229 t.Helper()
231 t.Errorf("%q != %q", expected, result)
236 func ensureContains(t *testing.T, result string, expected string) {
[all …]
Dvndk_test.go11 func TestVndkApexForVndkLite(t *testing.T) {
12 ctx := testApex(t, `
57 ensureExactContents(t, ctx, "com.android.vndk.current", "android_common_image", []string{
70 func TestVndkApexUsesVendorVariant(t *testing.T) {
93 ensureFileSrc := func(t *testing.T, files []fileInApex, path, src string) {
94 t.Helper()
97 ensureContains(t, f.src, src)
101 t.Errorf("expected path %q not found", path)
104 t.Run("VNDK lib doesn't have an apex variant", func(t *testing.T) {
105 ctx := testApex(t, bp)
[all …]
/build/soong/java/
Dplatform_bootclasspath_test.go31 func TestPlatformBootclasspath(t *testing.T) {
79 t.Run("missing", func(t *testing.T) {
82 RunTest(t)
85 t.Run("source", func(t *testing.T) {
89 ).RunTest(t)
91 CheckPlatformBootclasspathModules(t, result, "platform-bootclasspath", []string{
97 t.Run("prebuilt", func(t *testing.T) {
101 ).RunTest(t)
103 CheckPlatformBootclasspathModules(t, result, "platform-bootclasspath", []string{
109 t.Run("source+prebuilt - source preferred", func(t *testing.T) {
[all …]
Dapp_import_test.go28 func TestAndroidAppImport(t *testing.T) {
29 ctx, _ := testJava(t, `
45 t.Errorf("can't find dexpreopt outputs")
53 t.Errorf("Incorrect signing flags, expected: %q, got: %q", expected, signingFlag)
57 func TestAndroidAppImport_NoDexPreopt(t *testing.T) {
58 ctx, _ := testJava(t, `
74 t.Errorf("dexpreopt shouldn't have run.")
78 func TestAndroidAppImport_Presigned(t *testing.T) {
79 ctx, _ := testJava(t, `
95 t.Errorf("can't find dexpreopt outputs")
[all …]
Dandroidmk_test.go24 func TestRequired(t *testing.T) {
25 ctx, _ := testJava(t, `
34 entries := android.AndroidMkEntriesForTest(t, ctx, mod)[0]
39 t.Errorf("Unexpected required modules - expected: %q, actual: %q", expected, actual)
43 func TestHostdex(t *testing.T) {
44 ctx, _ := testJava(t, `
53 entriesList := android.AndroidMkEntriesForTest(t, ctx, mod)
55 t.Errorf("two entries are expected, but got %d", len(entriesList))
62 t.Errorf("Unexpected module name - expected: %q, actual: %q", expected, actual)
69 t.Errorf("Unexpected module name - expected: %q, actual: %q", expected, actual)
[all …]
Dlint_test.go24 func TestJavaLint(t *testing.T) {
25 ctx, _ := testJavaWithFS(t, `
42 sboxProto := android.RuleBuilderSboxProtoForTests(t, foo.Output("lint.sbox.textproto"))
44 t.Error("did not pass --baseline flag")
48 func TestJavaLintWithoutBaseline(t *testing.T) {
49 ctx, _ := testJavaWithFS(t, `
64 sboxProto := android.RuleBuilderSboxProtoForTests(t, foo.Output("lint.sbox.textproto"))
66 t.Error("passed --baseline flag for non existent file")
70 func TestJavaLintRequiresCustomLintFileToExist(t *testing.T) {
75 RunTestWithBp(t, `
[all …]
/build/soong/ui/build/paths/
Dlogs_test.go28 func TestSendLog(t *testing.T) {
30 t.Skip("skipping in short mode, sometimes hangs")
32 t.Run("Short name", func(t *testing.T) {
35 t.Fatal(err)
40 testSendLog(t, f, getSocketAddr)
43 testLongName := func(t *testing.T, lookup socketAddrFunc) {
46 t.Fatal(err)
51 testSendLog(t, f, lookup)
55 t.Run("Long name", func(t *testing.T) {
56 testLongName(t, getSocketAddr)
[all …]
/build/blueprint/pathtools/
Dfs_test.go49 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/blueprint/
Dmodule_ctx_test.go80 func TestAliasVariation(t *testing.T) {
82 t.Helper()
101 t.Errorf("unexpected parse errors:")
103 t.Errorf(" %s", err)
110 t.Errorf("unexpected dep errors:")
112 t.Errorf(" %s", err)
119 t.Errorf("unexpected dep error: %s", err)
124 t.Errorf("missing dep error: %s", expectedErr)
129 t.Helper()
133 t.Run("simple", func(t *testing.T) {
[all …]
/build/soong/etc/
Dprebuilt_etc_test.go39 func TestPrebuiltEtcVariants(t *testing.T) {
40 result := prepareForPrebuiltEtcTest.RunTestWithBp(t, `
59 t.Errorf("expected 1, got %#v", foo_variants)
64 t.Errorf("expected 2, got %#v", bar_variants)
69 t.Errorf("expected 1, got %#v", bar_variants)
73 func TestPrebuiltEtcOutputPath(t *testing.T) {
74 result := prepareForPrebuiltEtcTest.RunTestWithBp(t, `
83 android.AssertStringEquals(t, "output file path", "foo.installed.conf", p.outputFilePath.Base())
86 func TestPrebuiltEtcGlob(t *testing.T) {
87 result := prepareForPrebuiltEtcTest.RunTestWithBp(t, `
[all …]
/build/soong/sdk/
Dbp_test.go57 func checkPropertySetFixture(t *testing.T, val interface{}, hasTags bool) {
59 android.AssertDeepEquals(t, "wrong x value", "taxi", set.getValue("x"))
60 android.AssertDeepEquals(t, "wrong y value", 1729, set.getValue("y"))
63 android.AssertDeepEquals(t, "wrong sub.x value", "taxi", subset.getValue("x"))
64 android.AssertDeepEquals(t, "wrong sub.y value", 1729, subset.getValue("y"))
67 android.AssertDeepEquals(t, "wrong y tag", "tag_y", set.getTag("y"))
68 android.AssertDeepEquals(t, "wrong sub.x tag", "tag_x", subset.getTag("x"))
70 android.AssertDeepEquals(t, "wrong y tag", nil, set.getTag("y"))
71 android.AssertDeepEquals(t, "wrong sub.x tag", nil, subset.getTag("x"))
75 func TestAddPropertySimple(t *testing.T) {
[all …]
/build/soong/cc/config/
Dtoolchain.go45 t, err := findToolchain(ctx.Os(), ctx.Arch())
54 return t
58 t, err := findToolchain(os, arch)
62 return t
115 func (t *toolchainBase) ndkTriple() string {
175 func (t toolchainBase) ToolPath() string {
209 func LibclangRuntimeLibrary(t Toolchain, library string) string {
210 arch := t.LibclangRuntimeLibraryArch()
214 if !t.Bionic() {
220 func BuiltinsRuntimeLibrary(t Toolchain) string {
[all …]
/build/soong/ui/logger/
Dlogger_test.go31 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/
Dtest.go26 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 …]

12345678910>>...14