blob: f912ce62614f12327ff7cab5146a2b3c370fab59 [file] [log] [blame]
Cole Faust5a231bd2024-02-07 09:43:59 -08001// Copyright 2024 Google Inc. All rights reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package android
16
17import (
18 "fmt"
19 "reflect"
20 "testing"
21
22 "github.com/google/blueprint"
23 "github.com/google/blueprint/proptools"
24)
25
26func TestSelects(t *testing.T) {
27 testCases := []struct {
28 name string
29 bp string
30 provider selectsTestProvider
31 vendorVars map[string]map[string]string
32 expectedError string
33 }{
34 {
35 name: "basic string list",
36 bp: `
37 my_module_type {
38 name: "foo",
39 my_string_list: select(soong_config_variable("my_namespace", "my_variable"), {
40 "a": ["a.cpp"],
41 "b": ["b.cpp"],
Cole Faust683316a2024-04-02 16:45:54 -070042 default: ["c.cpp"],
Cole Faust5a231bd2024-02-07 09:43:59 -080043 }),
44 }
45 `,
46 provider: selectsTestProvider{
47 my_string_list: &[]string{"c.cpp"},
48 },
49 },
50 {
51 name: "basic string",
52 bp: `
53 my_module_type {
54 name: "foo",
55 my_string: select(soong_config_variable("my_namespace", "my_variable"), {
56 "a": "a.cpp",
57 "b": "b.cpp",
Cole Faust683316a2024-04-02 16:45:54 -070058 default: "c.cpp",
Cole Faust5a231bd2024-02-07 09:43:59 -080059 }),
60 }
61 `,
62 provider: selectsTestProvider{
63 my_string: proptools.StringPtr("c.cpp"),
64 },
65 },
66 {
67 name: "basic bool",
68 bp: `
69 my_module_type {
70 name: "foo",
71 my_bool: select(soong_config_variable("my_namespace", "my_variable"), {
72 "a": true,
73 "b": false,
Cole Faust683316a2024-04-02 16:45:54 -070074 default: true,
Cole Faust5a231bd2024-02-07 09:43:59 -080075 }),
76 }
77 `,
78 provider: selectsTestProvider{
79 my_bool: proptools.BoolPtr(true),
80 },
81 },
82 {
Cole Faustbdd8aee2024-03-14 14:33:02 -070083 name: "basic paths",
84 bp: `
85 my_module_type {
86 name: "foo",
87 my_paths: select(soong_config_variable("my_namespace", "my_variable"), {
88 "a": ["foo.txt"],
89 "b": ["bar.txt"],
Cole Faust683316a2024-04-02 16:45:54 -070090 default: ["baz.txt"],
Cole Faustbdd8aee2024-03-14 14:33:02 -070091 }),
92 }
93 `,
94 provider: selectsTestProvider{
95 my_paths: &[]string{"baz.txt"},
96 },
97 },
98 {
99 name: "paths with module references",
100 bp: `
101 my_module_type {
102 name: "foo",
103 my_paths: select(soong_config_variable("my_namespace", "my_variable"), {
104 "a": [":a"],
105 "b": [":b"],
Cole Faust683316a2024-04-02 16:45:54 -0700106 default: [":c"],
Cole Faustbdd8aee2024-03-14 14:33:02 -0700107 }),
108 }
109 `,
110 expectedError: `"foo" depends on undefined module "c"`,
111 },
112 {
Cole Faust5a231bd2024-02-07 09:43:59 -0800113 name: "Differing types",
114 bp: `
115 my_module_type {
116 name: "foo",
117 my_string: select(soong_config_variable("my_namespace", "my_variable"), {
118 "a": "a.cpp",
119 "b": true,
Cole Faust683316a2024-04-02 16:45:54 -0700120 default: "c.cpp",
Cole Faust5a231bd2024-02-07 09:43:59 -0800121 }),
122 }
123 `,
Cole Faust12c8ed42024-03-28 16:26:59 -0700124 expectedError: `Android.bp:8:5: Found select statement with differing types "string" and "bool" in its cases`,
125 },
126 {
127 name: "Select type doesn't match property type",
128 bp: `
129 my_module_type {
130 name: "foo",
131 my_string: select(soong_config_variable("my_namespace", "my_variable"), {
132 "a": false,
133 "b": true,
Cole Faust683316a2024-04-02 16:45:54 -0700134 default: true,
Cole Faust12c8ed42024-03-28 16:26:59 -0700135 }),
136 }
137 `,
138 expectedError: `can't assign bool value to string property "my_string\[0\]"`,
Cole Faust5a231bd2024-02-07 09:43:59 -0800139 },
140 {
141 name: "String list non-default",
142 bp: `
143 my_module_type {
144 name: "foo",
145 my_string_list: select(soong_config_variable("my_namespace", "my_variable"), {
146 "a": ["a.cpp"],
147 "b": ["b.cpp"],
Cole Faust683316a2024-04-02 16:45:54 -0700148 default: ["c.cpp"],
Cole Faust5a231bd2024-02-07 09:43:59 -0800149 }),
150 }
151 `,
152 provider: selectsTestProvider{
153 my_string_list: &[]string{"a.cpp"},
154 },
155 vendorVars: map[string]map[string]string{
156 "my_namespace": {
157 "my_variable": "a",
158 },
159 },
160 },
161 {
162 name: "String list append",
163 bp: `
164 my_module_type {
165 name: "foo",
166 my_string_list: select(soong_config_variable("my_namespace", "my_variable"), {
167 "a": ["a.cpp"],
168 "b": ["b.cpp"],
Cole Faust683316a2024-04-02 16:45:54 -0700169 default: ["c.cpp"],
Cole Faust5a231bd2024-02-07 09:43:59 -0800170 }) + select(soong_config_variable("my_namespace", "my_variable_2"), {
171 "a2": ["a2.cpp"],
172 "b2": ["b2.cpp"],
Cole Faust683316a2024-04-02 16:45:54 -0700173 default: ["c2.cpp"],
Cole Faust5a231bd2024-02-07 09:43:59 -0800174 }),
175 }
176 `,
177 provider: selectsTestProvider{
178 my_string_list: &[]string{"a.cpp", "c2.cpp"},
179 },
180 vendorVars: map[string]map[string]string{
181 "my_namespace": {
182 "my_variable": "a",
183 },
184 },
185 },
186 {
187 name: "String list prepend literal",
188 bp: `
189 my_module_type {
190 name: "foo",
191 my_string_list: ["literal.cpp"] + select(soong_config_variable("my_namespace", "my_variable"), {
192 "a2": ["a2.cpp"],
193 "b2": ["b2.cpp"],
Cole Faust683316a2024-04-02 16:45:54 -0700194 default: ["c2.cpp"],
Cole Faust5a231bd2024-02-07 09:43:59 -0800195 }),
196 }
197 `,
198 provider: selectsTestProvider{
199 my_string_list: &[]string{"literal.cpp", "c2.cpp"},
200 },
201 },
202 {
203 name: "String list append literal",
204 bp: `
205 my_module_type {
206 name: "foo",
207 my_string_list: select(soong_config_variable("my_namespace", "my_variable"), {
208 "a2": ["a2.cpp"],
209 "b2": ["b2.cpp"],
Cole Faust683316a2024-04-02 16:45:54 -0700210 default: ["c2.cpp"],
Cole Faust5a231bd2024-02-07 09:43:59 -0800211 }) + ["literal.cpp"],
212 }
213 `,
214 provider: selectsTestProvider{
215 my_string_list: &[]string{"c2.cpp", "literal.cpp"},
216 },
217 },
218 {
Cole Faust74ef4652024-03-27 16:45:41 -0700219 name: "true + false = true",
Cole Faust5a231bd2024-02-07 09:43:59 -0800220 bp: `
221 my_module_type {
222 name: "foo",
223 my_bool: select(soong_config_variable("my_namespace", "my_variable"), {
224 "a": true,
225 "b": false,
Cole Faust683316a2024-04-02 16:45:54 -0700226 default: true,
Cole Faust5a231bd2024-02-07 09:43:59 -0800227 }) + false,
228 }
229 `,
Cole Faust74ef4652024-03-27 16:45:41 -0700230 provider: selectsTestProvider{
231 my_bool: proptools.BoolPtr(true),
232 },
233 },
234 {
235 name: "false + false = false",
236 bp: `
237 my_module_type {
238 name: "foo",
239 my_bool: select(soong_config_variable("my_namespace", "my_variable"), {
240 "a": true,
241 "b": false,
Cole Faust683316a2024-04-02 16:45:54 -0700242 default: true,
Cole Faust74ef4652024-03-27 16:45:41 -0700243 }) + false,
244 }
245 `,
246 vendorVars: map[string]map[string]string{
247 "my_namespace": {
248 "my_variable": "b",
249 },
250 },
251 provider: selectsTestProvider{
252 my_bool: proptools.BoolPtr(false),
253 },
Cole Faust5a231bd2024-02-07 09:43:59 -0800254 },
255 {
256 name: "Append string",
257 bp: `
258 my_module_type {
259 name: "foo",
260 my_string: select(soong_config_variable("my_namespace", "my_variable"), {
261 "a": "a",
262 "b": "b",
Cole Faust683316a2024-04-02 16:45:54 -0700263 default: "c",
Cole Faust5a231bd2024-02-07 09:43:59 -0800264 }) + ".cpp",
265 }
266 `,
267 provider: selectsTestProvider{
268 my_string: proptools.StringPtr("c.cpp"),
269 },
270 },
Cole Faust0aa21cc2024-03-20 12:28:03 -0700271 {
Cole Faustfc57d402024-04-11 12:09:44 -0700272 name: "Select on arch",
Cole Faust0aa21cc2024-03-20 12:28:03 -0700273 bp: `
274 my_module_type {
275 name: "foo",
Cole Faustfc57d402024-04-11 12:09:44 -0700276 my_string: select(arch(), {
Cole Faust0aa21cc2024-03-20 12:28:03 -0700277 "x86": "my_x86",
278 "x86_64": "my_x86_64",
279 "arm": "my_arm",
280 "arm64": "my_arm64",
Cole Faust683316a2024-04-02 16:45:54 -0700281 default: "my_default",
Cole Faust0aa21cc2024-03-20 12:28:03 -0700282 }),
283 }
284 `,
285 provider: selectsTestProvider{
286 my_string: proptools.StringPtr("my_arm64"),
287 },
288 },
Cole Faust12c8ed42024-03-28 16:26:59 -0700289 {
Cole Faustfc57d402024-04-11 12:09:44 -0700290 name: "Select on os",
291 bp: `
292 my_module_type {
293 name: "foo",
294 my_string: select(os(), {
295 "android": "my_android",
296 "linux": "my_linux",
297 default: "my_default",
298 }),
299 }
300 `,
301 provider: selectsTestProvider{
302 my_string: proptools.StringPtr("my_android"),
303 },
304 },
305 {
Cole Faust12c8ed42024-03-28 16:26:59 -0700306 name: "Unset value",
307 bp: `
308 my_module_type {
309 name: "foo",
310 my_string: select(soong_config_variable("my_namespace", "my_variable"), {
311 "a": unset,
312 "b": "b",
Cole Faust683316a2024-04-02 16:45:54 -0700313 default: "c",
Cole Faust12c8ed42024-03-28 16:26:59 -0700314 })
315 }
316 `,
317 vendorVars: map[string]map[string]string{
318 "my_namespace": {
319 "my_variable": "a",
320 },
321 },
322 provider: selectsTestProvider{},
323 },
324 {
325 name: "Unset value on different branch",
326 bp: `
327 my_module_type {
328 name: "foo",
329 my_string: select(soong_config_variable("my_namespace", "my_variable"), {
330 "a": unset,
331 "b": "b",
Cole Faust683316a2024-04-02 16:45:54 -0700332 default: "c",
Cole Faust12c8ed42024-03-28 16:26:59 -0700333 })
334 }
335 `,
336 provider: selectsTestProvider{
337 my_string: proptools.StringPtr("c"),
338 },
339 },
340 {
341 name: "unset + unset = unset",
342 bp: `
343 my_module_type {
344 name: "foo",
345 my_string: select(soong_config_variable("my_namespace", "my_variable"), {
Cole Faustfdbf5d42024-04-10 15:01:23 -0700346 "foo": "bar",
Cole Faust683316a2024-04-02 16:45:54 -0700347 default: unset,
Cole Faust12c8ed42024-03-28 16:26:59 -0700348 }) + select(soong_config_variable("my_namespace", "my_variable2"), {
Cole Faustfdbf5d42024-04-10 15:01:23 -0700349 "baz": "qux",
Cole Faust683316a2024-04-02 16:45:54 -0700350 default: unset,
Cole Faust12c8ed42024-03-28 16:26:59 -0700351 })
352 }
353 `,
354 provider: selectsTestProvider{},
355 },
356 {
357 name: "unset + string = string",
358 bp: `
359 my_module_type {
360 name: "foo",
361 my_string: select(soong_config_variable("my_namespace", "my_variable"), {
Cole Faustfdbf5d42024-04-10 15:01:23 -0700362 "foo": "bar",
Cole Faust683316a2024-04-02 16:45:54 -0700363 default: unset,
Cole Faust12c8ed42024-03-28 16:26:59 -0700364 }) + select(soong_config_variable("my_namespace", "my_variable2"), {
Cole Faust683316a2024-04-02 16:45:54 -0700365 default: "a",
Cole Faust12c8ed42024-03-28 16:26:59 -0700366 })
367 }
368 `,
369 provider: selectsTestProvider{
370 my_string: proptools.StringPtr("a"),
371 },
372 },
373 {
374 name: "unset + bool = bool",
375 bp: `
376 my_module_type {
377 name: "foo",
378 my_bool: select(soong_config_variable("my_namespace", "my_variable"), {
379 "a": true,
Cole Faust683316a2024-04-02 16:45:54 -0700380 default: unset,
Cole Faust12c8ed42024-03-28 16:26:59 -0700381 }) + select(soong_config_variable("my_namespace", "my_variable2"), {
Cole Faust683316a2024-04-02 16:45:54 -0700382 default: true,
Cole Faust12c8ed42024-03-28 16:26:59 -0700383 })
384 }
385 `,
386 provider: selectsTestProvider{
387 my_bool: proptools.BoolPtr(true),
388 },
389 },
Cole Faust02dd6e52024-04-03 17:04:57 -0700390 {
391 name: "defaults with lists are appended",
392 bp: `
393 my_module_type {
394 name: "foo",
395 defaults: ["bar"],
396 my_string_list: select(soong_config_variable("my_namespace", "my_variable"), {
397 "a": ["a1"],
398 default: ["b1"],
399 }),
400 }
401 my_defaults {
402 name: "bar",
403 my_string_list: select(soong_config_variable("my_namespace", "my_variable2"), {
404 "a": ["a2"],
405 default: ["b2"],
406 }),
407 }
408 `,
409 provider: selectsTestProvider{
410 my_string_list: &[]string{"b2", "b1"},
411 },
412 },
413 {
414 name: "Replacing string list",
415 bp: `
416 my_module_type {
417 name: "foo",
418 defaults: ["bar"],
419 replacing_string_list: select(soong_config_variable("my_namespace", "my_variable"), {
420 "a": ["a1"],
421 default: ["b1"],
422 }),
423 }
424 my_defaults {
425 name: "bar",
426 replacing_string_list: select(soong_config_variable("my_namespace", "my_variable2"), {
427 "a": ["a2"],
428 default: ["b2"],
429 }),
430 }
431 `,
432 provider: selectsTestProvider{
433 replacing_string_list: &[]string{"b1"},
434 },
435 },
Cole Faustfdbf5d42024-04-10 15:01:23 -0700436 {
437 name: "Multi-condition string 1",
438 bp: `
439 my_module_type {
440 name: "foo",
441 my_string: select((
442 soong_config_variable("my_namespace", "my_variable"),
443 soong_config_variable("my_namespace", "my_variable2"),
444 ), {
445 ("a", "b"): "a+b",
446 ("a", default): "a+default",
447 (default, default): "default",
448 }),
449 }
450 `,
451 vendorVars: map[string]map[string]string{
452 "my_namespace": {
453 "my_variable": "a",
454 "my_variable2": "b",
455 },
456 },
457 provider: selectsTestProvider{
458 my_string: proptools.StringPtr("a+b"),
459 },
460 },
461 {
462 name: "Multi-condition string 2",
463 bp: `
464 my_module_type {
465 name: "foo",
466 my_string: select((
467 soong_config_variable("my_namespace", "my_variable"),
468 soong_config_variable("my_namespace", "my_variable2"),
469 ), {
470 ("a", "b"): "a+b",
471 ("a", default): "a+default",
472 (default, default): "default",
473 }),
474 }
475 `,
476 vendorVars: map[string]map[string]string{
477 "my_namespace": {
478 "my_variable": "a",
479 "my_variable2": "c",
480 },
481 },
482 provider: selectsTestProvider{
483 my_string: proptools.StringPtr("a+default"),
484 },
485 },
486 {
487 name: "Multi-condition string 3",
488 bp: `
489 my_module_type {
490 name: "foo",
491 my_string: select((
492 soong_config_variable("my_namespace", "my_variable"),
493 soong_config_variable("my_namespace", "my_variable2"),
494 ), {
495 ("a", "b"): "a+b",
496 ("a", default): "a+default",
497 (default, default): "default",
498 }),
499 }
500 `,
501 vendorVars: map[string]map[string]string{
502 "my_namespace": {
503 "my_variable": "c",
504 "my_variable2": "b",
505 },
506 },
507 provider: selectsTestProvider{
508 my_string: proptools.StringPtr("default"),
509 },
510 },
511 {
512 name: "Select on boolean",
513 bp: `
514 my_module_type {
515 name: "foo",
516 my_string: select(boolean_var_for_testing(), {
517 true: "t",
518 false: "f",
519 }),
520 }
521 `,
522 vendorVars: map[string]map[string]string{
523 "boolean_var": {
524 "for_testing": "true",
525 },
526 },
527 provider: selectsTestProvider{
528 my_string: proptools.StringPtr("t"),
529 },
530 },
531 {
532 name: "Select on boolean false",
533 bp: `
534 my_module_type {
535 name: "foo",
536 my_string: select(boolean_var_for_testing(), {
537 true: "t",
538 false: "f",
539 }),
540 }
541 `,
542 vendorVars: map[string]map[string]string{
543 "boolean_var": {
544 "for_testing": "false",
545 },
546 },
547 provider: selectsTestProvider{
548 my_string: proptools.StringPtr("f"),
549 },
550 },
551 {
552 name: "Select on boolean undefined",
553 bp: `
554 my_module_type {
555 name: "foo",
556 my_string: select(boolean_var_for_testing(), {
557 true: "t",
558 false: "f",
559 }),
560 }
561 `,
562 expectedError: "foo",
563 },
564 {
565 name: "Select on boolean undefined with default",
566 bp: `
567 my_module_type {
568 name: "foo",
569 my_string: select(boolean_var_for_testing(), {
570 true: "t",
571 false: "f",
572 default: "default",
573 }),
574 }
575 `,
576 provider: selectsTestProvider{
577 my_string: proptools.StringPtr("default"),
578 },
579 },
580 {
581 name: "Mismatched condition types",
582 bp: `
583 my_module_type {
584 name: "foo",
585 my_string: select(boolean_var_for_testing(), {
586 "true": "t",
587 "false": "f",
588 default: "default",
589 }),
590 }
591 `,
592 vendorVars: map[string]map[string]string{
593 "boolean_var": {
594 "for_testing": "false",
595 },
596 },
597 expectedError: "Expected all branches of a select on condition boolean_var_for_testing\\(\\) to have type bool, found string",
598 },
Cole Faust5a231bd2024-02-07 09:43:59 -0800599 }
600
601 for _, tc := range testCases {
602 t.Run(tc.name, func(t *testing.T) {
603 fixtures := GroupFixturePreparers(
Cole Faust02dd6e52024-04-03 17:04:57 -0700604 PrepareForTestWithDefaults,
Cole Faust0aa21cc2024-03-20 12:28:03 -0700605 PrepareForTestWithArchMutator,
Cole Faust5a231bd2024-02-07 09:43:59 -0800606 FixtureRegisterWithContext(func(ctx RegistrationContext) {
607 ctx.RegisterModuleType("my_module_type", newSelectsMockModule)
Cole Faust02dd6e52024-04-03 17:04:57 -0700608 ctx.RegisterModuleType("my_defaults", newSelectsMockModuleDefaults)
Cole Faust5a231bd2024-02-07 09:43:59 -0800609 }),
610 FixtureModifyProductVariables(func(variables FixtureProductVariables) {
611 variables.VendorVars = tc.vendorVars
612 }),
613 )
614 if tc.expectedError != "" {
615 fixtures = fixtures.ExtendWithErrorHandler(FixtureExpectsOneErrorPattern(tc.expectedError))
616 }
617 result := fixtures.RunTestWithBp(t, tc.bp)
618
619 if tc.expectedError == "" {
Cole Faust0aa21cc2024-03-20 12:28:03 -0700620 m := result.ModuleForTests("foo", "android_arm64_armv8-a")
621 p, _ := OtherModuleProvider(result.testContext.OtherModuleProviderAdaptor(), m.Module(), selectsTestProviderKey)
Cole Faust5a231bd2024-02-07 09:43:59 -0800622 if !reflect.DeepEqual(p, tc.provider) {
623 t.Errorf("Expected:\n %q\ngot:\n %q", tc.provider.String(), p.String())
624 }
625 }
626 })
627 }
628}
629
630type selectsTestProvider struct {
Cole Faust02dd6e52024-04-03 17:04:57 -0700631 my_bool *bool
632 my_string *string
633 my_string_list *[]string
634 my_paths *[]string
635 replacing_string_list *[]string
Cole Faust5a231bd2024-02-07 09:43:59 -0800636}
637
638func (p *selectsTestProvider) String() string {
639 myBoolStr := "nil"
640 if p.my_bool != nil {
641 myBoolStr = fmt.Sprintf("%t", *p.my_bool)
642 }
643 myStringStr := "nil"
644 if p.my_string != nil {
645 myStringStr = *p.my_string
646 }
647 return fmt.Sprintf(`selectsTestProvider {
648 my_bool: %v,
649 my_string: %s,
650 my_string_list: %s,
Cole Faustbdd8aee2024-03-14 14:33:02 -0700651 my_paths: %s,
Cole Faust02dd6e52024-04-03 17:04:57 -0700652 replacing_string_list %s,
653}`, myBoolStr, myStringStr, p.my_string_list, p.my_paths, p.replacing_string_list)
Cole Faust5a231bd2024-02-07 09:43:59 -0800654}
655
656var selectsTestProviderKey = blueprint.NewProvider[selectsTestProvider]()
657
658type selectsMockModuleProperties struct {
Cole Faust02dd6e52024-04-03 17:04:57 -0700659 My_bool proptools.Configurable[bool]
660 My_string proptools.Configurable[string]
661 My_string_list proptools.Configurable[[]string]
662 My_paths proptools.Configurable[[]string] `android:"path"`
663 Replacing_string_list proptools.Configurable[[]string] `android:"replace_instead_of_append,arch_variant"`
Cole Faust5a231bd2024-02-07 09:43:59 -0800664}
665
666type selectsMockModule struct {
667 ModuleBase
668 DefaultableModuleBase
669 properties selectsMockModuleProperties
670}
671
672func (p *selectsMockModule) GenerateAndroidBuildActions(ctx ModuleContext) {
Cole Faustbdd8aee2024-03-14 14:33:02 -0700673 SetProvider(ctx, selectsTestProviderKey, selectsTestProvider{
Cole Faustb78ce432024-04-04 10:55:19 -0700674 my_bool: p.properties.My_bool.Get(ctx),
675 my_string: p.properties.My_string.Get(ctx),
676 my_string_list: p.properties.My_string_list.Get(ctx),
677 my_paths: p.properties.My_paths.Get(ctx),
678 replacing_string_list: p.properties.Replacing_string_list.Get(ctx),
Cole Faust5a231bd2024-02-07 09:43:59 -0800679 })
680}
681
682func newSelectsMockModule() Module {
683 m := &selectsMockModule{}
684 m.AddProperties(&m.properties)
Cole Faust0aa21cc2024-03-20 12:28:03 -0700685 InitAndroidArchModule(m, HostAndDeviceSupported, MultilibFirst)
Cole Faust5a231bd2024-02-07 09:43:59 -0800686 InitDefaultableModule(m)
687 return m
688}
Cole Faust02dd6e52024-04-03 17:04:57 -0700689
690type selectsMockModuleDefaults struct {
691 ModuleBase
692 DefaultsModuleBase
693}
694
695func (d *selectsMockModuleDefaults) GenerateAndroidBuildActions(ctx ModuleContext) {
696}
697
698func newSelectsMockModuleDefaults() Module {
699 module := &selectsMockModuleDefaults{}
700
701 module.AddProperties(
702 &selectsMockModuleProperties{},
703 )
704
705 InitDefaultsModule(module)
706
707 return module
708}