Merge changes I5f2fd123,Ie8d8e229,Id2194f6b into main

* changes:
  Move RelativeToTop out of basePath
  Make PathForArbitraryOutput return an OutputPath
  Run TestClasspath subtests in parallel
This commit is contained in:
Colin Cross
2024-07-30 16:30:54 +00:00
committed by Gerrit Code Review
5 changed files with 47 additions and 31 deletions

View File

@@ -56,7 +56,7 @@ func TestAndroidAppSet(t *testing.T) {
mkEntries := android.AndroidMkEntriesForTest(t, result.TestContext, module.Module())[0]
actualInstallFile := mkEntries.EntryMap["LOCAL_APK_SET_INSTALL_FILE"]
expectedInstallFile := []string{
strings.Replace(params.ImplicitOutputs[0].String(), android.OutSoongDir, result.Config.SoongOutDir(), 1),
strings.Replace(params.ImplicitOutputs[0].String(), android.TestOutSoongDir, result.Config.SoongOutDir(), 1),
}
if !reflect.DeepEqual(actualInstallFile, expectedInstallFile) {
t.Errorf("Unexpected LOCAL_APK_SET_INSTALL_FILE value: '%s', expected: '%s',",

View File

@@ -388,7 +388,9 @@ func TestClasspath(t *testing.T) {
},
}
t.Parallel()
t.Run("basic", func(t *testing.T) {
t.Parallel()
testClasspathTestCases(t, classpathTestcases, false)
})
@@ -404,6 +406,7 @@ func testClasspathTestCases(t *testing.T, classpathTestcases []classpathTestCase
}
t.Run(testcase.name, func(t *testing.T) {
t.Parallel()
moduleType := "java_library"
if testcase.moduleType != "" {
moduleType = testcase.moduleType