diff options
author | 2024-07-15 13:43:37 -0700 | |
---|---|---|
committer | 2024-07-15 13:50:18 -0700 | |
commit | d38e63d474f74c8555344d852548b417f776fd53 (patch) | |
tree | eadd086212a83597eef5581752e38b8589eabd88 /android/testing.go | |
parent | 2dbf71fed8a71a6d955c590ce374b86533b1daee (diff) |
Remove OutputFileProducer
All the module types that were using OutputFileProducer
are using OutputFilesProvider now. This CL removes the
remaining OutputFileProducer code.
Test: CI
Bug: 339477385
Change-Id: I3c29785a59b907117b16ca2d0e56ef846adfb228
Diffstat (limited to 'android/testing.go')
-rw-r--r-- | android/testing.go | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/android/testing.go b/android/testing.go index 18fd3b31c..e39a1a749 100644 --- a/android/testing.go +++ b/android/testing.go @@ -1018,31 +1018,21 @@ func (m TestingModule) VariablesForTestsRelativeToTop() map[string]string { return normalizeStringMapRelativeToTop(m.config, m.module.VariablesForTests()) } -// OutputFiles first checks if module base outputFiles property has any output +// OutputFiles checks if module base outputFiles property has any output // files can be used to return. -// If not, it calls OutputFileProducer.OutputFiles on the -// encapsulated module, exits the test immediately if there is an error and +// Exits the test immediately if there is an error and // otherwise returns the result of calling Paths.RelativeToTop // on the returned Paths. func (m TestingModule) OutputFiles(t *testing.T, tag string) Paths { - // TODO: remove OutputFileProducer part outputFiles := m.Module().base().outputFiles if tag == "" && outputFiles.DefaultOutputFiles != nil { return outputFiles.DefaultOutputFiles.RelativeToTop() } else if taggedOutputFiles, hasTag := outputFiles.TaggedOutputFiles[tag]; hasTag { - return taggedOutputFiles + return taggedOutputFiles.RelativeToTop() } - producer, ok := m.module.(OutputFileProducer) - if !ok { - t.Fatalf("%q must implement OutputFileProducer\n", m.module.Name()) - } - paths, err := producer.OutputFiles(tag) - if err != nil { - t.Fatal(err) - } - - return paths.RelativeToTop() + t.Fatal(fmt.Errorf("No test output file has been set for tag %q", tag)) + return nil } // TestingSingleton is wrapper around an android.Singleton that provides methods to find information about individual |