diff options
| author | 2022-08-24 02:14:02 +0000 | |
|---|---|---|
| committer | 2022-08-24 02:14:02 +0000 | |
| commit | 5e7c4756b51ece50898ce6d5475c16d288102631 (patch) | |
| tree | cf23a212d2e854a5c33e47b7971ab7edc05510d7 /android/module_test.go | |
| parent | 9f4f8a3cc786b5a6c36ea11775a8d43be1f46a0f (diff) | |
| parent | 409d27712f927c84b58091d2be54c7638cd619cd (diff) | |
Merge "Add a new `test_options.tags` attribute to customize test execution"
Diffstat (limited to 'android/module_test.go')
| -rw-r--r-- | android/module_test.go | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/android/module_test.go b/android/module_test.go index 835ab4c7c..0580bef24 100644 --- a/android/module_test.go +++ b/android/module_test.go @@ -912,7 +912,7 @@ func TestSortedUniqueNamedPaths(t *testing.T) { } } -func TestProcessCommonTestOptions(t *testing.T) { +func TestSetAndroidMkEntriesWithTestOptions(t *testing.T) { tests := []struct { name string testOptions CommonTestOptions @@ -939,6 +939,31 @@ func TestProcessCommonTestOptions(t *testing.T) { }, expected: map[string][]string{}, }, + { + name: "empty tag", + testOptions: CommonTestOptions{ + Tags: []string{}, + }, + expected: map[string][]string{}, + }, + { + name: "single tag", + testOptions: CommonTestOptions{ + Tags: []string{"tag1"}, + }, + expected: map[string][]string{ + "LOCAL_TEST_OPTIONS_TAGS": []string{"tag1"}, + }, + }, + { + name: "multiple tag", + testOptions: CommonTestOptions{ + Tags: []string{"tag1", "tag2", "tag3"}, + }, + expected: map[string][]string{ + "LOCAL_TEST_OPTIONS_TAGS": []string{"tag1", "tag2", "tag3"}, + }, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { |