diff options
| author | 2021-09-10 09:15:06 +0000 | |
|---|---|---|
| committer | 2021-09-10 09:15:06 +0000 | |
| commit | eee562f950c02a07ffc9380b115a9e5905ec9f32 (patch) | |
| tree | 5f85ad98d06cfad59562640e9601fd397ef97419 | |
| parent | 6afa749d1d08e1c09e77ccd3f01363fa77449da4 (diff) | |
| parent | 98e0d88aac762fb60aef5b0e60c394524067c8cf (diff) | |
Merge "Avoid duplicate module names in the error from ModuleForTests."
| -rw-r--r-- | android/testing.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/android/testing.go b/android/testing.go index e25e5c5f5..bd2faa291 100644 --- a/android/testing.go +++ b/android/testing.go @@ -509,12 +509,11 @@ func (ctx *TestContext) ModuleForTests(name, variant string) TestingModule { allVariants = append(allVariants, ctx.ModuleSubDir(m)) } }) - sort.Strings(allModuleNames) sort.Strings(allVariants) if len(allVariants) == 0 { panic(fmt.Errorf("failed to find module %q. All modules:\n %s", - name, strings.Join(allModuleNames, "\n "))) + name, strings.Join(SortedUniqueStrings(allModuleNames), "\n "))) } else { panic(fmt.Errorf("failed to find module %q variant %q. All variants:\n %s", name, variant, strings.Join(allVariants, "\n "))) |