Home
last modified time | relevance | path

Searched refs:test (Results 1 – 25 of 80) sorted by relevance

1234

/build/soong/cc/
Dtest.go160 func (test *testBinary) testPerSrc() bool {
161 return Bool(test.Properties.Test_per_src)
164 func (test *testBinary) srcs() []string {
165 return test.baseCompiler.Properties.Srcs
168 func (test *testBinary) dataPaths() []android.DataPath {
169 return test.data
172 func (test *testBinary) isAllTestsVariation() bool {
173 stem := test.binaryDecorator.Properties.Stem
177 func (test *testBinary) setSrc(name, src string) {
178 test.baseCompiler.Properties.Srcs = []string{src}
[all …]
Dtest_data_test.go39 test {
62 test {
82 test {
101 test {
118 for _, test := range testDataTests {
119 t.Run(test.name, func(t *testing.T) {
121 "dir/Android.bp": []byte(test.modules),
138 if len(got) != len(test.data) {
140 len(test.data), len(got))
144 if i >= len(test.data) {
[all …]
/build/soong/rust/
Dtest.go55 func (test *testDecorator) nativeCoverage() bool {
69 test := &testDecorator{
75 module.compiler = test
76 module.AddProperties(&test.Properties)
77 return module, test
80 func (test *testDecorator) compilerProps() []interface{} {
81 return append(test.binaryDecorator.compilerProps(), &test.Properties)
84 func (test *testDecorator) install(ctx ModuleContext, file android.Path) {
85 test.testConfig = tradefed.AutoGenRustTestConfig(ctx,
86 test.Properties.Test_config,
[all …]
/build/soong/android/
Dexpand_test.go166 for _, test := range expandTestCases {
167 got, err := Expand(test.in, func(s string) (string, error) {
171 if err != nil && !test.err {
172 t.Errorf("%q: unexpected error %s", test.in, err.Error())
173 } else if err == nil && test.err {
174 t.Errorf("%q: expected error, got %q", test.in, got)
175 } else if !test.err && got != test.out {
176 t.Errorf("%q: expected %q, got %q", test.in, test.out, got)
182 for _, test := range expandTestCases {
183 got, err := ExpandNinjaEscaped(test.in, expander)
[all …]
Dpath_properties_test.go70 test {
82 test {
98 for _, test := range tests {
99 t.Run(test.name, func(t *testing.T) {
100 bp := test.bp + `
132 if g, w := m.sourceDeps, test.deps; !reflect.DeepEqual(g, w) {
Dpaths_test.go832 for _, test := range testCases {
833 t.Run(test.name, func(t *testing.T) {
834 testConfig := pathTestConfig(test.buildDir)
836 _, err := f.f(ctx, test.src)
841 if test.err == "" {
843 } else if !strings.Contains(err.Error(), test.err) {
844 t.Fatalf("incorrect error, want substring %q got %q", test.err, err.Error())
847 if test.err != "" {
848 t.Fatalf("missing error %q", test.err)
964 for _, test := range tests {
[all …]
/build/blueprint/pathtools/
Dfs_test.go96 for _, test := range testCases {
97 t.Run(test.from, func(t *testing.T) {
98 got := mock.followSymlinks(test.from)
99 if got != test.to {
100 t.Errorf("want: %v, got %v", test.to, got)
190 for _, test := range testCases {
191 t.Run(test.name, func(t *testing.T) {
192 got, err := fs.IsDir(filepath.Join(dir, test.name))
193 checkErr(t, test.err, err)
194 if got != test.isDir {
[all …]
/build/soong/python/
Dtest.go47 func (test *testDecorator) bootstrapperProps() []interface{} {
48 return append(test.binaryDecorator.bootstrapperProps(), &test.testProperties)
51 func (test *testDecorator) install(ctx android.ModuleContext, file android.Path) {
52 test.testConfig = tradefed.AutoGenPythonBinaryHostTestConfig(ctx, test.testProperties.Test_config,
53 test.testProperties.Test_config_template, test.binaryDecorator.binaryProperties.Test_suites,
54 test.binaryDecorator.binaryProperties.Auto_gen_config)
56 test.binaryDecorator.pythonInstaller.dir = "nativetest"
57 test.binaryDecorator.pythonInstaller.dir64 = "nativetest64"
59 test.binaryDecorator.pythonInstaller.relative = ctx.ModuleName()
61 test.binaryDecorator.pythonInstaller.install(ctx, file)
[all …]
/build/blueprint/proptools/
Descape_test.go31 in: `test`,
32 out: `test`,
36 in: `$test`,
37 out: `$$test`,
41 in: `test$`,
42 out: `test$$`,
46 in: `$test$`,
47 out: `$$test$$`,
54 in: `test`,
55 out: `test`,
[all …]
Dfilter_test.go221 for _, test := range tests {
222 t.Run(test.name, func(t *testing.T) {
223 out, filtered := FilterPropertyStruct(reflect.TypeOf(test.in),
231 if filtered != test.filtered {
232 t.Errorf("expected filtered %v, got %v", test.filtered, filtered)
234 expected := reflect.TypeOf(test.out)
271 for _, test := range tests {
272 t.Run(test.name, func(t *testing.T) {
273 out, filtered := filterPropertyStruct(reflect.TypeOf(test.in), "", test.maxNameSize,
281 if filtered != test.filtered {
[all …]
Dtag_test.go61 for _, test := range tests {
62 t.Run(test.field, func(t *testing.T) {
63 field, _ := reflect.TypeOf(testType{}).FieldByName(test.field)
64 if got := HasTag(field, "name", "value"); got != test.want {
65 t.Errorf(`HasTag(%q, "name", "value") = %v, want %v`, field.Tag, got, test.want)
133 for _, test := range tests {
134 t.Run(test.name, func(t *testing.T) {
135 if got := PropertyIndexesWithTag(test.ps, "name", "value"); !reflect.DeepEqual(got, test.want) {
136 t.Errorf("PropertyIndexesWithTag() = %v, want %v", got, test.want)
/build/soong/bpfix/bpfix/
Dbpfix_test.go251 for _, test := range tests {
252 t.Run(test.name, func(t *testing.T) {
253 runPass(t, test.in, test.out, func(fixer *Fixer) error {
337 for _, test := range tests {
338 t.Run(test.name, func(t *testing.T) {
339 runPass(t, test.in, test.out, func(fixer *Fixer) error {
490 for _, test := range tests {
491 t.Run(test.name, func(t *testing.T) {
492 runPass(t, test.in, test.out, func(fixer *Fixer) error {
550 for _, test := range tests {
[all …]
/build/soong/androidmk/parser/
Dparser_test.go40 for _, test := range parserTestCases {
41 t.Run(test.name, func(t *testing.T) {
42 p := NewParser(test.name, bytes.NewBufferString(test.in))
49 if len(got) != len(test.out) {
50 t.Fatalf("length mismatch, expected %d nodes, got %d", len(test.out), len(got))
54 if got[i].Dump() != test.out[i].Dump() {
56 i, test.out[i], test.out[i].Dump(), got[i], got[i].Dump())
Dmake_strings_test.go92 for _, test := range splitNTestCases {
93 got := test.in.SplitN(test.sep, test.n)
95 expectedString := dumpArray(test.expected)
121 for _, test := range valueTestCases {
122 got := test.in.Value(nil)
123 if got != test.expected {
124 t.Errorf("\nwith: %q\nwant: %q\n got: %q", test.in.Dump(), test.expected, got)
164 for _, test := range splitWordsTestCases {
165 got := test.in.Words()
167 expectedString := dumpArray(test.expected)
[all …]
/build/soong/genrule/
Dgenrule_test.go462 for _, test := range testcases {
463 t.Run(test.name, func(t *testing.T) {
466 bp += test.prop
470 …config.TestProductVariables.Allow_missing_dependencies = proptools.BoolPtr(test.allowMissingDepend…
473 ctx.SetAllowMissingDependencies(test.allowMissingDependencies)
479 if errs == nil && test.err != "" {
480 t.Fatalf("want error %q, got no error", test.err)
481 } else if errs != nil && test.err == "" {
483 } else if test.err != "" {
491 if !strings.Contains(errs[0].Error(), test.err) {
[all …]
/build/soong/zip/
Dzip_test.go410 for _, test := range testCases {
411 t.Run(test.name, func(t *testing.T) {
412 if test.args.Error() != nil {
413 t.Fatal(test.args.Error())
417 args.FileArgs = test.args.FileArgs()
418 args.CompressionLevel = test.compressionLevel
419 args.EmulateJar = test.emulateJar
420 args.AddDirectoryEntriesToZip = test.dirEntries
421 args.NonDeflatedFiles = test.nonDeflatedFiles
422 args.ManifestSourcePath = test.manifest
[all …]
/build/soong/partner/androidmk/
Dandroidmk_test.go38 LOCAL_MODULE := test
57 for i, test := range testCases {
58 expected, err := bpfix.Reformat(test.expected)
63 …got, errs := androidmk.ConvertFile(fmt.Sprintf("<testcase %d>", i), bytes.NewBufferString(test.in))
70 …ed testcase '%s'\ninput:\n%s\n\nexpected:\n%s\ngot:\n%s\n", test.desc, strings.TrimSpace(test.in),…
/build/soong/java/
Dapp_test.go215 for _, test := range testCases {
217 config.TestProductVariables.AAPTPrebuiltDPI = test.aaptPrebuiltDPI
218 config.TestProductVariables.Platform_sdk_version = &test.sdkVersion
219 config.TestProductVariables.DeviceArch = test.deviceArch
220 config.TestProductVariables.DeviceSecondaryArch = test.deviceSecondaryArch
226 for k, v := range test.expected {
229 test.name, k, actual, v)
468 for _, test := range testCases {
469 t.Run(test.name, func(t *testing.T) {
470 if test.expectedError == "" {
[all …]
Ddexpreopt_test.go147 for _, test := range tests {
148 t.Run(test.name, func(t *testing.T) {
149 ctx, _ := testJava(t, test.bp)
154 if enabled != test.enabled {
155 t.Fatalf("want dexpreopt %s, got %s", enabledString(test.enabled), enabledString(enabled))
/build/soong/cmd/diff_target_files/
Dglob_test.go147 for _, test := range testCases {
148 t.Run(test.pattern+","+test.name, func(t *testing.T) {
149 match, err := Match(test.pattern, test.name)
153 if match != test.match {
154 t.Errorf("want: %v, got %v", test.match, match)
Dcompare_test.go120 for _, test := range testCases {
121 t.Run(test.name, func(t *testing.T) {
122 diff := diffTargetFilesLists(test.a, test.b)
124 if !reflect.DeepEqual(diff, test.diff) {
127 …t.Errorf(" want %v, %v, %v", test.diff.modified, test.diff.onlyInA, test.diff.onl…
/build/blueprint/parser/
Dprinter_test.go226 test /* test */ {
246 test /* test */ {
300 test {
311 test {}
326 test {
337 test {}
350 test // test
357 test { // test
/build/soong/cmd/merge_zips/
Dmerge_zips_test.go241 for _, test := range testCases {
242 t.Run(test.name, func(t *testing.T) {
243 inputZips := make([]InputZip, len(test.in))
244 for i, in := range test.in {
248 want := testZipEntriesToBuf(test.out)
254 test.sort, test.jar, false, test.stripDirEntries, test.ignoreDuplicates,
255 test.stripFiles, test.stripDirs, test.zipsToNotStrip)
262 if test.err != "" {
264 t.Fatal("missing err, expected: ", test.err)
265 } else if !strings.Contains(strings.ToLower(err.Error()), strings.ToLower(test.err)) {
[all …]
/build/soong/remoteexec/
Dremoteexec_test.go60 for _, test := range tests {
61 t.Run(test.name, func(t *testing.T) {
62 if got := test.params.Template(); got != test.want {
63 t.Errorf("Template() returned\n%s\nwant\n%s", got, test.want)
/build/soong/scripts/
Dtest_config_fixer.py55 for test in tests:
56 options = get_children_with_tag(test, 'option')
66 for test in tests:
67 if test.getAttribute('class') == "com.android.tradefed.targetprep.TestAppInstallSetup":
68 options = get_children_with_tag(test, 'option')

1234