diff options
author | 2024-12-17 10:42:42 -0800 | |
---|---|---|
committer | 2024-12-17 10:42:42 -0800 | |
commit | 6b7075f19fd4efa290179e894ae942e16ac9f699 (patch) | |
tree | dec563ce7eb60b0dbeb9913609181c596c70ac6d | |
parent | 85289cfc214bbd75feb976dcf87986a0a28415c0 (diff) |
Always install to out/target instead of out/soong/target
So that when using soong-only builds, we don't have to update
a bunch of tools and other parts of soong that expect files in
out/target.
Bug: 383892968
Test: m nothing --no-skip-soong-tests
Change-Id: Idba3b5a416e6ffff799ec3ce632a8a4fbafe341f
-rw-r--r-- | android/module_test.go | 8 | ||||
-rw-r--r-- | android/paths.go | 2 | ||||
-rw-r--r-- | android/paths_test.go | 4 | ||||
-rw-r--r-- | android/rule_builder_test.go | 8 | ||||
-rw-r--r-- | apex/apex_test.go | 2 | ||||
-rw-r--r-- | apex/platform_bootclasspath_test.go | 2 | ||||
-rw-r--r-- | etc/prebuilt_etc_test.go | 38 | ||||
-rw-r--r-- | java/app_import_test.go | 6 | ||||
-rw-r--r-- | java/app_test.go | 36 | ||||
-rw-r--r-- | java/dexpreopt_test.go | 2 | ||||
-rw-r--r-- | java/platform_bootclasspath_test.go | 2 | ||||
-rw-r--r-- | java/ravenwood_test.go | 2 | ||||
-rw-r--r-- | java/rro_test.go | 14 | ||||
-rw-r--r-- | java/systemserver_classpath_fragment_test.go | 2 | ||||
-rw-r--r-- | rust/builder_test.go | 6 | ||||
-rw-r--r-- | tradefed_modules/test_module_config_test.go | 34 | ||||
-rw-r--r-- | xml/xml_test.go | 2 |
17 files changed, 85 insertions, 85 deletions
diff --git a/android/module_test.go b/android/module_test.go index d5bf94137..6e6d44909 100644 --- a/android/module_test.go +++ b/android/module_test.go @@ -327,21 +327,21 @@ func TestInstall(t *testing.T) { outputRule := func(name string) TestingBuildParams { return module(name, false).Output(name) } installRule := func(name string) TestingBuildParams { - return module(name, false).Output(filepath.Join("out/soong/target/product/test_device/system", name)) + return module(name, false).Output(filepath.Join("out/target/product/test_device/system", name)) } symlinkRule := func(name string) TestingBuildParams { - return module(name, false).Output(filepath.Join("out/soong/target/product/test_device/system/symlinks", name)) + return module(name, false).Output(filepath.Join("out/target/product/test_device/system/symlinks", name)) } hostOutputRule := func(name string) TestingBuildParams { return module(name, true).Output(name) } hostInstallRule := func(name string) TestingBuildParams { - return module(name, true).Output(filepath.Join("out/soong/host/linux-x86", name)) + return module(name, true).Output(filepath.Join("out/host/linux-x86", name)) } hostSymlinkRule := func(name string) TestingBuildParams { - return module(name, true).Output(filepath.Join("out/soong/host/linux-x86/symlinks", name)) + return module(name, true).Output(filepath.Join("out/host/linux-x86/symlinks", name)) } assertInputs := func(params TestingBuildParams, inputs ...Path) { diff --git a/android/paths.go b/android/paths.go index 94f00ad43..d57ac7043 100644 --- a/android/paths.go +++ b/android/paths.go @@ -2076,7 +2076,7 @@ func pathForInstall(ctx PathContext, os OsType, arch ArchType, partition string, reportPathError(ctx, err) } - base := pathForPartitionInstallDir(ctx, partition, partitionPath, ctx.Config().KatiEnabled()) + base := pathForPartitionInstallDir(ctx, partition, partitionPath, true) return base.Join(ctx, pathComponents...) } diff --git a/android/paths_test.go b/android/paths_test.go index 5e618f914..20beecc35 100644 --- a/android/paths_test.go +++ b/android/paths_test.go @@ -1561,7 +1561,7 @@ func TestPathRelativeToTop(t *testing.T) { t.Run("install for soong", func(t *testing.T) { p := PathForModuleInstall(ctx, "install/path") - AssertPathRelativeToTopEquals(t, "install path for soong", "out/soong/target/product/test_device/system/install/path", p) + AssertPathRelativeToTopEquals(t, "install path for soong", "out/target/product/test_device/system/install/path", p) }) t.Run("install for make", func(t *testing.T) { p := PathForModuleInstall(ctx, "install/path") @@ -1584,7 +1584,7 @@ func TestPathRelativeToTop(t *testing.T) { } expected := []string{ - "out/soong/target/product/test_device/system/install/path", + "out/target/product/test_device/system/install/path", "out/soong/output/path", "source/path", } diff --git a/android/rule_builder_test.go b/android/rule_builder_test.go index e1a1e08c4..566bafa06 100644 --- a/android/rule_builder_test.go +++ b/android/rule_builder_test.go @@ -358,7 +358,7 @@ func TestRuleBuilder(t *testing.T) { "command3 input3 out_local/soong/module/output2 out_local/soong/module/output3 input3 out_local/soong/module/output2", } - wantDepMergerCommand := "out_local/soong/host/" + ctx.Config().PrebuiltOS() + "/bin/dep_fixer " + + wantDepMergerCommand := "out_local/host/" + ctx.Config().PrebuiltOS() + "/bin/dep_fixer " + "out_local/soong/module/DepFile out_local/soong/module/depfile out_local/soong/module/ImplicitDepFile out_local/soong/module/depfile2" AssertDeepEquals(t, "rule.Commands()", wantCommands, rule.Commands()) @@ -388,7 +388,7 @@ func TestRuleBuilder(t *testing.T) { "command3 input3 __SBOX_SANDBOX_DIR__/out/output2 __SBOX_SANDBOX_DIR__/out/output3 input3 __SBOX_SANDBOX_DIR__/out/output2", } - wantDepMergerCommand := "out_local/soong/host/" + ctx.Config().PrebuiltOS() + "/bin/dep_fixer __SBOX_SANDBOX_DIR__/out/DepFile __SBOX_SANDBOX_DIR__/out/depfile __SBOX_SANDBOX_DIR__/out/ImplicitDepFile __SBOX_SANDBOX_DIR__/out/depfile2" + wantDepMergerCommand := "out_local/host/" + ctx.Config().PrebuiltOS() + "/bin/dep_fixer __SBOX_SANDBOX_DIR__/out/DepFile __SBOX_SANDBOX_DIR__/out/depfile __SBOX_SANDBOX_DIR__/out/ImplicitDepFile __SBOX_SANDBOX_DIR__/out/depfile2" AssertDeepEquals(t, "rule.Commands()", wantCommands, rule.Commands()) @@ -664,7 +664,7 @@ func TestRuleBuilder_Build(t *testing.T) { rspFile := filepath.Join(outDir, "rsp") rspFile2 := filepath.Join(outDir, "rsp2") manifest := filepath.Join(outDir, "sbox.textproto") - sbox := filepath.Join("out", "soong", "host", result.Config.PrebuiltOS(), "bin/sbox") + sbox := filepath.Join("out", "host", result.Config.PrebuiltOS(), "bin/sbox") sandboxPath := shared.TempDirForOutDir("out/soong") cmd := sbox + ` --sandbox-path ` + sandboxPath + ` --output-dir ` + sboxOutDir + ` --manifest ` + manifest @@ -680,7 +680,7 @@ func TestRuleBuilder_Build(t *testing.T) { rspFile := filepath.Join(outDir, "rsp") rspFile2 := filepath.Join(outDir, "rsp2") manifest := filepath.Join(outDir, "sbox.textproto") - sbox := filepath.Join("out", "soong", "host", result.Config.PrebuiltOS(), "bin/sbox") + sbox := filepath.Join("out", "host", result.Config.PrebuiltOS(), "bin/sbox") sandboxPath := shared.TempDirForOutDir("out/soong") cmd := sbox + ` --sandbox-path ` + sandboxPath + ` --output-dir ` + sboxOutDir + ` --manifest ` + manifest diff --git a/apex/apex_test.go b/apex/apex_test.go index 81a62d9d9..90d19bc1d 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -4771,7 +4771,7 @@ func TestApexInVariousPartition(t *testing.T) { `) apex := ctx.ModuleForTests("myapex", "android_common_myapex").Module().(*apexBundle) - expected := "out/soong/target/product/test_device/" + tc.partition + "/apex" + expected := "out/target/product/test_device/" + tc.partition + "/apex" actual := apex.installDir.RelativeToTop().String() if actual != expected { t.Errorf("wrong install path. expected %q. actual %q", expected, actual) diff --git a/apex/platform_bootclasspath_test.go b/apex/platform_bootclasspath_test.go index 9f9b0b4d8..c13d59989 100644 --- a/apex/platform_bootclasspath_test.go +++ b/apex/platform_bootclasspath_test.go @@ -653,7 +653,7 @@ func TestPlatformBootclasspath_IncludesRemainingApexJars(t *testing.T) { true, // proto should be generated "myapex:foo", // apex doesn't generate its own config, so must be in platform_bootclasspath "bootclasspath.pb", - "out/soong/target/product/test_device/system/etc/classpaths", + "out/target/product/test_device/system/etc/classpaths", ) } diff --git a/etc/prebuilt_etc_test.go b/etc/prebuilt_etc_test.go index 0fd04d85f..70b54629f 100644 --- a/etc/prebuilt_etc_test.go +++ b/etc/prebuilt_etc_test.go @@ -133,8 +133,8 @@ func TestPrebuiltEtcDsts(t *testing.T) { android.AssertStringEquals(t, "output file path", "different.name", p.outputFilePaths[1].Base()) expectedPaths := [...]string{ - "out/soong/target/product/test_device/system/etc/foodir", - "out/soong/target/product/test_device/system/etc/bardir/extradir", + "out/target/product/test_device/system/etc/foodir", + "out/target/product/test_device/system/etc/bardir/extradir", } android.AssertPathRelativeToTopEquals(t, "install dir", expectedPaths[0], p.installDirPaths[0]) android.AssertPathRelativeToTopEquals(t, "install dir", expectedPaths[1], p.installDirPaths[1]) @@ -155,8 +155,8 @@ func TestPrebuiltEtcDstsPlusRelativeInstallPath(t *testing.T) { android.AssertStringEquals(t, "output file path", "different.name", p.outputFilePaths[1].Base()) expectedPaths := [...]string{ - "out/soong/target/product/test_device/system/etc/somewhere/foodir", - "out/soong/target/product/test_device/system/etc/somewhere/bardir/extradir", + "out/target/product/test_device/system/etc/somewhere/foodir", + "out/target/product/test_device/system/etc/somewhere/bardir/extradir", } android.AssertPathRelativeToTopEquals(t, "install dir", expectedPaths[0], p.installDirPaths[0]) android.AssertPathRelativeToTopEquals(t, "install dir", expectedPaths[1], p.installDirPaths[1]) @@ -271,7 +271,7 @@ func TestPrebuiltEtcRelativeInstallPathInstallDirPath(t *testing.T) { `) p := result.Module("foo.conf", "android_arm64_armv8-a").(*PrebuiltEtc) - expected := "out/soong/target/product/test_device/system/etc/bar" + expected := "out/target/product/test_device/system/etc/bar" android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPaths[0]) } @@ -337,7 +337,7 @@ func TestPrebuiltRootInstallDirPath(t *testing.T) { `) p := result.Module("foo.conf", "android_arm64_armv8-a").(*PrebuiltEtc) - expected := "out/soong/target/product/test_device/system" + expected := "out/target/product/test_device/system" android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPaths[0]) } @@ -362,7 +362,7 @@ func TestPrebuiltAvbInstallDirPath(t *testing.T) { `) p := result.Module("foo.conf", "android_arm64_armv8-a").(*PrebuiltEtc) - expected := "out/soong/target/product/test_device/root/avb" + expected := "out/target/product/test_device/root/avb" android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPaths[0]) } @@ -386,7 +386,7 @@ func TestPrebuiltUserShareInstallDirPath(t *testing.T) { `) p := result.Module("foo.conf", "android_arm64_armv8-a").(*PrebuiltEtc) - expected := "out/soong/target/product/test_device/system/usr/share/bar" + expected := "out/target/product/test_device/system/usr/share/bar" android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPaths[0]) } @@ -401,7 +401,7 @@ func TestPrebuiltUserShareHostInstallDirPath(t *testing.T) { buildOS := result.Config.BuildOS.String() p := result.Module("foo.conf", buildOS+"_common").(*PrebuiltEtc) - expected := filepath.Join("out/soong/host", result.Config.PrebuiltOS(), "usr", "share", "bar") + expected := filepath.Join("out/host", result.Config.PrebuiltOS(), "usr", "share", "bar") android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPaths[0]) } @@ -415,7 +415,7 @@ func TestPrebuiltPrebuiltUserHyphenDataInstallDirPath(t *testing.T) { `) p := result.Module("foo.conf", "android_arm64_armv8-a").(*PrebuiltEtc) - expected := "out/soong/target/product/test_device/system/usr/hyphen-data/bar" + expected := "out/target/product/test_device/system/usr/hyphen-data/bar" android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPaths[0]) } @@ -429,7 +429,7 @@ func TestPrebuiltPrebuiltUserKeyLayoutInstallDirPath(t *testing.T) { `) p := result.Module("foo.conf", "android_arm64_armv8-a").(*PrebuiltEtc) - expected := "out/soong/target/product/test_device/system/usr/keylayout/bar" + expected := "out/target/product/test_device/system/usr/keylayout/bar" android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPaths[0]) } @@ -443,7 +443,7 @@ func TestPrebuiltPrebuiltUserKeyCharsInstallDirPath(t *testing.T) { `) p := result.Module("foo.conf", "android_arm64_armv8-a").(*PrebuiltEtc) - expected := "out/soong/target/product/test_device/system/usr/keychars/bar" + expected := "out/target/product/test_device/system/usr/keychars/bar" android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPaths[0]) } @@ -457,7 +457,7 @@ func TestPrebuiltPrebuiltUserIdcInstallDirPath(t *testing.T) { `) p := result.Module("foo.conf", "android_arm64_armv8-a").(*PrebuiltEtc) - expected := "out/soong/target/product/test_device/system/usr/idc/bar" + expected := "out/target/product/test_device/system/usr/idc/bar" android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPaths[0]) } @@ -470,7 +470,7 @@ func TestPrebuiltFontInstallDirPath(t *testing.T) { `) p := result.Module("foo.conf", "android_common").(*PrebuiltEtc) - expected := "out/soong/target/product/test_device/system/fonts" + expected := "out/target/product/test_device/system/fonts" android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPaths[0]) } @@ -483,12 +483,12 @@ func TestPrebuiltOverlayInstallDirPath(t *testing.T) { `) p := result.Module("foo.conf", "android_arm64_armv8-a").(*PrebuiltEtc) - expected := "out/soong/target/product/test_device/system/overlay" + expected := "out/target/product/test_device/system/overlay" android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPaths[0]) } func TestPrebuiltFirmwareDirPath(t *testing.T) { - targetPath := "out/soong/target/product/test_device" + targetPath := "out/target/product/test_device" tests := []struct { description string config string @@ -522,7 +522,7 @@ func TestPrebuiltFirmwareDirPath(t *testing.T) { } func TestPrebuiltDSPDirPath(t *testing.T) { - targetPath := "out/soong/target/product/test_device" + targetPath := "out/target/product/test_device" tests := []struct { description string config string @@ -556,7 +556,7 @@ func TestPrebuiltDSPDirPath(t *testing.T) { } func TestPrebuiltRFSADirPath(t *testing.T) { - targetPath := "out/soong/target/product/test_device" + targetPath := "out/target/product/test_device" tests := []struct { description string config string @@ -600,6 +600,6 @@ func TestPrebuiltMediaAutoDirPath(t *testing.T) { `) p := result.Module("foo", "android_common").(*PrebuiltEtc) - expected := "out/soong/target/product/test_device/product/media/alarms" + expected := "out/target/product/test_device/product/media/alarms" android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPaths[0]) } diff --git a/java/app_import_test.go b/java/app_import_test.go index 54a5e7518..ef8f60a7e 100644 --- a/java/app_import_test.go +++ b/java/app_import_test.go @@ -664,17 +664,17 @@ func TestAndroidAppImport_relativeInstallPath(t *testing.T) { }{ { name: "no_relative_install_path", - expectedInstallPath: "out/soong/target/product/test_device/system/app/no_relative_install_path/no_relative_install_path.apk", + expectedInstallPath: "out/target/product/test_device/system/app/no_relative_install_path/no_relative_install_path.apk", errorMessage: "Install path is not correct when relative_install_path is missing", }, { name: "relative_install_path", - expectedInstallPath: "out/soong/target/product/test_device/system/app/my/path/relative_install_path/relative_install_path.apk", + expectedInstallPath: "out/target/product/test_device/system/app/my/path/relative_install_path/relative_install_path.apk", errorMessage: "Install path is not correct for app when relative_install_path is present", }, { name: "privileged_relative_install_path", - expectedInstallPath: "out/soong/target/product/test_device/system/priv-app/my/path/privileged_relative_install_path/privileged_relative_install_path.apk", + expectedInstallPath: "out/target/product/test_device/system/priv-app/my/path/privileged_relative_install_path/privileged_relative_install_path.apk", errorMessage: "Install path is not correct for privileged app when relative_install_path is present", }, } diff --git a/java/app_test.go b/java/app_test.go index 11556b05c..4e915d2e9 100644 --- a/java/app_test.go +++ b/java/app_test.go @@ -2476,7 +2476,7 @@ func TestPackageNameOverride(t *testing.T) { packageNameOverride: "", expected: []string{ "out/soong/.intermediates/foo/android_common/foo.apk", - "out/soong/target/product/test_device/system/app/foo/foo.apk", + "out/target/product/test_device/system/app/foo/foo.apk", }, }, { @@ -2492,7 +2492,7 @@ func TestPackageNameOverride(t *testing.T) { expected: []string{ // The package apk should be still be the original name for test dependencies. "out/soong/.intermediates/foo/android_common/bar.apk", - "out/soong/target/product/test_device/system/app/bar/bar.apk", + "out/target/product/test_device/system/app/bar/bar.apk", }, }, { @@ -2508,7 +2508,7 @@ func TestPackageNameOverride(t *testing.T) { packageNameOverride: "", expected: []string{ "out/soong/.intermediates/foo/android_common/bar.apk", - "out/soong/target/product/test_device/system/app/bar/bar.apk", + "out/target/product/test_device/system/app/bar/bar.apk", }, }, } @@ -2651,7 +2651,7 @@ func TestOverrideAndroidApp(t *testing.T) { name: "foo", moduleName: "foo", variantName: "android_common", - apkPath: "out/soong/target/product/test_device/system/app/foo/foo.apk", + apkPath: "out/target/product/test_device/system/app/foo/foo.apk", certFlag: "build/make/target/product/security/expiredkey.x509.pem build/make/target/product/security/expiredkey.pk8", certSigningFlags: "", overrides: []string{"qux"}, @@ -2663,7 +2663,7 @@ func TestOverrideAndroidApp(t *testing.T) { name: "foo", moduleName: "bar", variantName: "android_common_bar", - apkPath: "out/soong/target/product/test_device/system/app/bar/bar.apk", + apkPath: "out/target/product/test_device/system/app/bar/bar.apk", certFlag: "cert/new_cert.x509.pem cert/new_cert.pk8", certSigningFlags: "--lineage lineage.bin --rotation-min-sdk-version 32", overrides: []string{"qux", "foo"}, @@ -2675,7 +2675,7 @@ func TestOverrideAndroidApp(t *testing.T) { name: "foo", moduleName: "baz", variantName: "android_common_baz", - apkPath: "out/soong/target/product/test_device/system/app/baz/baz.apk", + apkPath: "out/target/product/test_device/system/app/baz/baz.apk", certFlag: "build/make/target/product/security/expiredkey.x509.pem build/make/target/product/security/expiredkey.pk8", certSigningFlags: "", overrides: []string{"qux", "foo"}, @@ -2687,7 +2687,7 @@ func TestOverrideAndroidApp(t *testing.T) { name: "foo", moduleName: "baz_no_rename_resources", variantName: "android_common_baz_no_rename_resources", - apkPath: "out/soong/target/product/test_device/system/app/baz_no_rename_resources/baz_no_rename_resources.apk", + apkPath: "out/target/product/test_device/system/app/baz_no_rename_resources/baz_no_rename_resources.apk", certFlag: "build/make/target/product/security/expiredkey.x509.pem build/make/target/product/security/expiredkey.pk8", certSigningFlags: "", overrides: []string{"qux", "foo"}, @@ -2699,7 +2699,7 @@ func TestOverrideAndroidApp(t *testing.T) { name: "foo_no_rename_resources", moduleName: "baz_base_no_rename_resources", variantName: "android_common_baz_base_no_rename_resources", - apkPath: "out/soong/target/product/test_device/system/app/baz_base_no_rename_resources/baz_base_no_rename_resources.apk", + apkPath: "out/target/product/test_device/system/app/baz_base_no_rename_resources/baz_base_no_rename_resources.apk", certFlag: "build/make/target/product/security/expiredkey.x509.pem build/make/target/product/security/expiredkey.pk8", certSigningFlags: "", overrides: []string{"qux", "foo_no_rename_resources"}, @@ -2711,7 +2711,7 @@ func TestOverrideAndroidApp(t *testing.T) { name: "foo_no_rename_resources", moduleName: "baz_override_base_rename_resources", variantName: "android_common_baz_override_base_rename_resources", - apkPath: "out/soong/target/product/test_device/system/app/baz_override_base_rename_resources/baz_override_base_rename_resources.apk", + apkPath: "out/target/product/test_device/system/app/baz_override_base_rename_resources/baz_override_base_rename_resources.apk", certFlag: "build/make/target/product/security/expiredkey.x509.pem build/make/target/product/security/expiredkey.pk8", certSigningFlags: "", overrides: []string{"qux", "foo_no_rename_resources"}, @@ -2888,33 +2888,33 @@ func TestOverrideAndroidAppStem(t *testing.T) { { moduleName: "foo", variantName: "android_common", - apkPath: "out/soong/target/product/test_device/system/app/foo/foo.apk", + apkPath: "out/target/product/test_device/system/app/foo/foo.apk", }, { moduleName: "foo", variantName: "android_common_bar", - apkPath: "out/soong/target/product/test_device/system/app/bar/bar.apk", + apkPath: "out/target/product/test_device/system/app/bar/bar.apk", }, { moduleName: "foo", variantName: "android_common_baz", - apkPath: "out/soong/target/product/test_device/system/app/baz_stem/baz_stem.apk", + apkPath: "out/target/product/test_device/system/app/baz_stem/baz_stem.apk", }, { moduleName: "foo2", variantName: "android_common", - apkPath: "out/soong/target/product/test_device/system/app/foo2_stem/foo2_stem.apk", + apkPath: "out/target/product/test_device/system/app/foo2_stem/foo2_stem.apk", }, { moduleName: "foo2", variantName: "android_common_bar2", // Note that this may cause the duplicate output error. - apkPath: "out/soong/target/product/test_device/system/app/foo2_stem/foo2_stem.apk", + apkPath: "out/target/product/test_device/system/app/foo2_stem/foo2_stem.apk", }, { moduleName: "foo2", variantName: "android_common_baz2", - apkPath: "out/soong/target/product/test_device/system/app/baz2_stem/baz2_stem.apk", + apkPath: "out/target/product/test_device/system/app/baz2_stem/baz2_stem.apk", }, } { variant := ctx.ModuleForTests(expected.moduleName, expected.variantName) @@ -3024,7 +3024,7 @@ func TestOverrideAndroidTest(t *testing.T) { variant := ctx.ModuleForTests("foo_test", expected.variantName) // Check the final apk name - variant.Output("out/soong" + expected.apkPath) + variant.Output("out" + expected.apkPath) // Check if the overrides field values are correctly aggregated. mod := variant.Module().(*AndroidTest) @@ -4305,8 +4305,8 @@ func TestPrivappAllowlist(t *testing.T) { } // verify that permissions are copied to device - app.Output("out/soong/target/product/test_device/system/etc/permissions/foo.xml") - overrideApp.Output("out/soong/target/product/test_device/system/etc/permissions/bar.xml") + app.Output("out/target/product/test_device/system/etc/permissions/foo.xml") + overrideApp.Output("out/target/product/test_device/system/etc/permissions/bar.xml") } func TestPrivappAllowlistAndroidMk(t *testing.T) { diff --git a/java/dexpreopt_test.go b/java/dexpreopt_test.go index 07d0595e6..207ff65b3 100644 --- a/java/dexpreopt_test.go +++ b/java/dexpreopt_test.go @@ -296,7 +296,7 @@ func TestDex2oatToolDeps(t *testing.T) { }) } - sourceDex2oatPath := "host/linux-x86/bin/dex2oatd" + sourceDex2oatPath := "../host/linux-x86/bin/dex2oatd" prebuiltDex2oatPath := ".intermediates/prebuilt_dex2oatd/linux_glibc_x86_64/dex2oatd" testDex2oatToolDep(true, false, false, sourceDex2oatPath) diff --git a/java/platform_bootclasspath_test.go b/java/platform_bootclasspath_test.go index 7fa6ddb38..f2768dbe3 100644 --- a/java/platform_bootclasspath_test.go +++ b/java/platform_bootclasspath_test.go @@ -204,7 +204,7 @@ func TestPlatformBootclasspath_ClasspathFragmentPaths(t *testing.T) { p := result.Module("platform-bootclasspath", "android_common").(*platformBootclasspathModule) android.AssertStringEquals(t, "output filepath", "bootclasspath.pb", p.ClasspathFragmentBase.outputFilepath.Base()) - android.AssertPathRelativeToTopEquals(t, "install filepath", "out/soong/target/product/test_device/system/etc/classpaths", p.ClasspathFragmentBase.installDirPath) + android.AssertPathRelativeToTopEquals(t, "install filepath", "out/target/product/test_device/system/etc/classpaths", p.ClasspathFragmentBase.installDirPath) } func TestPlatformBootclasspathModule_AndroidMkEntries(t *testing.T) { diff --git a/java/ravenwood_test.go b/java/ravenwood_test.go index 6394a9ac9..f7fe8e30b 100644 --- a/java/ravenwood_test.go +++ b/java/ravenwood_test.go @@ -100,7 +100,7 @@ var prepareRavenwoodRuntime = android.GroupFixturePreparers( `), ) -var installPathPrefix = "out/soong/host/linux-x86/testcases" +var installPathPrefix = "out/host/linux-x86/testcases" func TestRavenwoodRuntime(t *testing.T) { if runtime.GOOS != "linux" { diff --git a/java/rro_test.go b/java/rro_test.go index 4d58bb498..b94651137 100644 --- a/java/rro_test.go +++ b/java/rro_test.go @@ -216,7 +216,7 @@ func TestOverrideRuntimeResourceOverlay(t *testing.T) { }{ { variantName: "android_common", - apkPath: "out/soong/target/product/test_device/product/overlay/foo_overlay.apk", + apkPath: "out/target/product/test_device/product/overlay/foo_overlay.apk", overrides: nil, targetVariant: "android_common", packageFlag: "", @@ -224,7 +224,7 @@ func TestOverrideRuntimeResourceOverlay(t *testing.T) { }, { variantName: "android_common_bar_overlay", - apkPath: "out/soong/target/product/test_device/product/overlay/bar_overlay.apk", + apkPath: "out/target/product/test_device/product/overlay/bar_overlay.apk", overrides: []string{"foo_overlay"}, targetVariant: "android_common_bar", packageFlag: "com.android.bar.overlay", @@ -283,23 +283,23 @@ func TestRuntimeResourceOverlayPartition(t *testing.T) { }{ { name: "device_specific", - expectedPath: "out/soong/target/product/test_device/odm/overlay", + expectedPath: "out/target/product/test_device/odm/overlay", }, { name: "soc_specific", - expectedPath: "out/soong/target/product/test_device/vendor/overlay", + expectedPath: "out/target/product/test_device/vendor/overlay", }, { name: "system_ext_specific", - expectedPath: "out/soong/target/product/test_device/system_ext/overlay", + expectedPath: "out/target/product/test_device/system_ext/overlay", }, { name: "product_specific", - expectedPath: "out/soong/target/product/test_device/product/overlay", + expectedPath: "out/target/product/test_device/product/overlay", }, { name: "default", - expectedPath: "out/soong/target/product/test_device/product/overlay", + expectedPath: "out/target/product/test_device/product/overlay", }, } for _, testCase := range testCases { diff --git a/java/systemserver_classpath_fragment_test.go b/java/systemserver_classpath_fragment_test.go index ba328e7b1..2a1728b52 100644 --- a/java/systemserver_classpath_fragment_test.go +++ b/java/systemserver_classpath_fragment_test.go @@ -50,7 +50,7 @@ func TestPlatformSystemServerClasspath_ClasspathFragmentPaths(t *testing.T) { p := result.Module("platform-systemserverclasspath", "android_common").(*platformSystemServerClasspathModule) android.AssertStringEquals(t, "output filepath", "systemserverclasspath.pb", p.ClasspathFragmentBase.outputFilepath.Base()) - android.AssertPathRelativeToTopEquals(t, "install filepath", "out/soong/target/product/test_device/system/etc/classpaths", p.ClasspathFragmentBase.installDirPath) + android.AssertPathRelativeToTopEquals(t, "install filepath", "out/target/product/test_device/system/etc/classpaths", p.ClasspathFragmentBase.installDirPath) } func TestPlatformSystemServerClasspathModule_AndroidMkEntries(t *testing.T) { diff --git a/rust/builder_test.go b/rust/builder_test.go index ae5ccde27..b4b022ed9 100644 --- a/rust/builder_test.go +++ b/rust/builder_test.go @@ -85,7 +85,7 @@ func TestCompilationOutputFiles(t *testing.T) { "out/soong/.intermediates/libfizz_buzz/android_arm64_armv8-a_dylib/libfizz_buzz.dylib.so", "out/soong/.intermediates/libfizz_buzz/android_arm64_armv8-a_dylib/libfizz_buzz.dylib.so.clippy", "out/soong/.intermediates/libfizz_buzz/android_arm64_armv8-a_dylib/unstripped/libfizz_buzz.dylib.so", - "out/soong/target/product/test_device/system/lib64/libfizz_buzz.dylib.so", + "out/target/product/test_device/system/lib64/libfizz_buzz.dylib.so", "out/soong/.intermediates/libfizz_buzz/android_arm64_armv8-a_dylib/meta_lic", }, }, @@ -118,7 +118,7 @@ func TestCompilationOutputFiles(t *testing.T) { "out/soong/.intermediates/fizz_buzz/android_arm64_armv8-a/fizz_buzz", "out/soong/.intermediates/fizz_buzz/android_arm64_armv8-a/fizz_buzz.clippy", "out/soong/.intermediates/fizz_buzz/android_arm64_armv8-a/unstripped/fizz_buzz", - "out/soong/target/product/test_device/system/bin/fizz_buzz", + "out/target/product/test_device/system/bin/fizz_buzz", "out/soong/.intermediates/fizz_buzz/android_arm64_armv8-a/meta_lic", }, }, @@ -154,7 +154,7 @@ func TestCompilationOutputFiles(t *testing.T) { "out/soong/.intermediates/librust_ffi/android_arm64_armv8-a_shared/unstripped/librust_ffi.so.toc", "out/soong/.intermediates/librust_ffi/android_arm64_armv8-a_shared/meta_lic", "out/soong/.intermediates/librust_ffi/android_arm64_armv8-a_shared/rustdoc.timestamp", - "out/soong/target/product/test_device/system/lib64/librust_ffi.so", + "out/target/product/test_device/system/lib64/librust_ffi.so", }, }, } diff --git a/tradefed_modules/test_module_config_test.go b/tradefed_modules/test_module_config_test.go index efd4a0425..037dcea04 100644 --- a/tradefed_modules/test_module_config_test.go +++ b/tradefed_modules/test_module_config_test.go @@ -77,9 +77,9 @@ func TestModuleConfigAndroidTest(t *testing.T) { // Ensure some entries from base are there, specifically support files for data and helper apps. // Do not use LOCAL_COMPATIBILITY_SUPPORT_FILES, but instead use LOCAL_SOONG_INSTALLED_COMPATIBILITY_SUPPORT_FILES android.AssertStringPathsRelativeToTopEquals(t, "support-files", ctx.Config, - []string{"out/soong/target/product/test_device/testcases/derived_test/arm64/base.apk", - "out/soong/target/product/test_device/testcases/derived_test/HelperApp.apk", - "out/soong/target/product/test_device/testcases/derived_test/data/testfile"}, + []string{"out/target/product/test_device/testcases/derived_test/arm64/base.apk", + "out/target/product/test_device/testcases/derived_test/HelperApp.apk", + "out/target/product/test_device/testcases/derived_test/data/testfile"}, entries.EntryMap["LOCAL_SOONG_INSTALLED_COMPATIBILITY_SUPPORT_FILES"]) android.AssertArrayString(t, "", entries.EntryMap["LOCAL_COMPATIBILITY_SUPPORT_FILES"], []string{}) @@ -97,15 +97,15 @@ func TestModuleConfigAndroidTest(t *testing.T) { convertedActual := make([]string, 5) for i, e := range entries.FooterLinesForTests() { // AssertStringPathsRelativeToTop doesn't replace both instances - convertedActual[i] = strings.Replace(e, ctx.Config.SoongOutDir(), "", 2) + convertedActual[i] = strings.Replace(e, ctx.Config.OutDir(), "", 2) } - android.AssertArrayString(t, fmt.Sprintf("%s", ctx.Config.SoongOutDir()), convertedActual, []string{ + android.AssertArrayString(t, fmt.Sprintf("%s", ctx.Config.OutDir()), []string{ "include $(BUILD_SYSTEM)/soong_app_prebuilt.mk", "/target/product/test_device/testcases/derived_test/arm64/base.apk: /target/product/test_device/testcases/base/arm64/base.apk", "/target/product/test_device/testcases/derived_test/HelperApp.apk: /target/product/test_device/testcases/base/HelperApp.apk", "/target/product/test_device/testcases/derived_test/data/testfile: /target/product/test_device/testcases/base/data/testfile", "", - }) + }, convertedActual) } func TestModuleConfigShTest(t *testing.T) { @@ -151,8 +151,8 @@ func TestModuleConfigShTest(t *testing.T) { // Ensure some entries from base are there, specifically support files for data and helper apps. // Do not use LOCAL_COMPATIBILITY_SUPPORT_FILES, but instead use LOCAL_SOONG_INSTALLED_COMPATIBILITY_SUPPORT_FILES android.AssertStringPathsRelativeToTopEquals(t, "support-files", ctx.Config, - []string{"out/soong/target/product/test_device/testcases/conch/arm64/testdata/data1", - "out/soong/target/product/test_device/testcases/conch/arm64/testdata/sub/data2"}, + []string{"out/target/product/test_device/testcases/conch/arm64/testdata/data1", + "out/target/product/test_device/testcases/conch/arm64/testdata/sub/data2"}, entries.EntryMap["LOCAL_SOONG_INSTALLED_COMPATIBILITY_SUPPORT_FILES"]) android.AssertArrayString(t, "", entries.EntryMap["LOCAL_COMPATIBILITY_SUPPORT_FILES"], []string{}) @@ -171,14 +171,14 @@ func TestModuleConfigShTest(t *testing.T) { convertedActual := make([]string, 4) for i, e := range entries.FooterLinesForTests() { // AssertStringPathsRelativeToTop doesn't replace both instances - convertedActual[i] = strings.Replace(e, ctx.Config.SoongOutDir(), "", 2) + convertedActual[i] = strings.Replace(e, ctx.Config.OutDir(), "", 2) } - android.AssertArrayString(t, fmt.Sprintf("%s", ctx.Config.SoongOutDir()), convertedActual, []string{ + android.AssertArrayString(t, fmt.Sprintf("%s", ctx.Config.OutDir()), []string{ "include $(BUILD_SYSTEM)/soong_cc_rust_prebuilt.mk", "/target/product/test_device/testcases/conch/arm64/testdata/data1: /target/product/test_device/testcases/shell_test/arm64/testdata/data1", "/target/product/test_device/testcases/conch/arm64/testdata/sub/data2: /target/product/test_device/testcases/shell_test/arm64/testdata/sub/data2", "", - }) + }, convertedActual) } @@ -330,9 +330,9 @@ func TestModuleConfigMultipleDerivedTestsWriteDistinctMakeEntries(t *testing.T) entries := android.AndroidMkEntriesForTest(t, ctx.TestContext, derived.Module())[0] // All these should be the same in both derived tests android.AssertStringPathsRelativeToTopEquals(t, "support-files", ctx.Config, - []string{"out/soong/target/product/test_device/testcases/derived_test/arm64/base.apk", - "out/soong/target/product/test_device/testcases/derived_test/HelperApp.apk", - "out/soong/target/product/test_device/testcases/derived_test/data/testfile"}, + []string{"out/target/product/test_device/testcases/derived_test/arm64/base.apk", + "out/target/product/test_device/testcases/derived_test/HelperApp.apk", + "out/target/product/test_device/testcases/derived_test/data/testfile"}, entries.EntryMap["LOCAL_SOONG_INSTALLED_COMPATIBILITY_SUPPORT_FILES"]) // Except this one, which points to the updated tradefed xml file. @@ -346,9 +346,9 @@ func TestModuleConfigMultipleDerivedTestsWriteDistinctMakeEntries(t *testing.T) entries := android.AndroidMkEntriesForTest(t, ctx.TestContext, derived.Module())[0] // All these should be the same in both derived tests android.AssertStringPathsRelativeToTopEquals(t, "support-files", ctx.Config, - []string{"out/soong/target/product/test_device/testcases/another_derived_test/arm64/base.apk", - "out/soong/target/product/test_device/testcases/another_derived_test/HelperApp.apk", - "out/soong/target/product/test_device/testcases/another_derived_test/data/testfile"}, + []string{"out/target/product/test_device/testcases/another_derived_test/arm64/base.apk", + "out/target/product/test_device/testcases/another_derived_test/HelperApp.apk", + "out/target/product/test_device/testcases/another_derived_test/data/testfile"}, entries.EntryMap["LOCAL_SOONG_INSTALLED_COMPATIBILITY_SUPPORT_FILES"]) // Except this one, which points to the updated tradefed xml file. android.AssertStringMatches(t, "", entries.EntryMap["LOCAL_FULL_TEST_CONFIG"][0], diff --git a/xml/xml_test.go b/xml/xml_test.go index a59a29318..9f28315b7 100644 --- a/xml/xml_test.go +++ b/xml/xml_test.go @@ -80,5 +80,5 @@ func TestPrebuiltEtcXml(t *testing.T) { } m := result.ModuleForTests("foo.xml", "android_arm64_armv8-a").Module().(*prebuiltEtcXml) - android.AssertPathRelativeToTopEquals(t, "installDir", "out/soong/target/product/test_device/system/etc", m.InstallDirPath()) + android.AssertPathRelativeToTopEquals(t, "installDir", "out/target/product/test_device/system/etc", m.InstallDirPath()) } |