diff options
author | 2024-03-15 17:34:26 +0000 | |
---|---|---|
committer | 2024-03-15 17:34:26 +0000 | |
commit | b9ae285b5578bceb9c35367620a3782c3a0ad911 (patch) | |
tree | e772c8974a817539dcce7a9f32deff94be357241 /filesystem/filesystem_test.go | |
parent | d10d54af7183afc2e8dbc425902513b2d4852f18 (diff) | |
parent | 4a2a7c98f6e3a335934b0f3bc7e23ea271f89324 (diff) |
Merge changes from topic "import_make_staging_dir" into main
* changes:
Add include_make_built_files
Don't use zip files when creating filesystems
Diffstat (limited to 'filesystem/filesystem_test.go')
-rw-r--r-- | filesystem/filesystem_test.go | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/filesystem/filesystem_test.go b/filesystem/filesystem_test.go index c44810517..6d62746ec 100644 --- a/filesystem/filesystem_test.go +++ b/filesystem/filesystem_test.go @@ -16,6 +16,7 @@ package filesystem import ( "os" + "path/filepath" "testing" "android/soong/android" @@ -93,6 +94,22 @@ func TestFileSystemDeps(t *testing.T) { } } +func TestIncludeMakeBuiltFiles(t *testing.T) { + result := fixture.RunTestWithBp(t, ` + android_filesystem { + name: "myfilesystem", + include_make_built_files: "system", + } + `) + + output := result.ModuleForTests("myfilesystem", "android_common").Output("myfilesystem.img") + + stampFile := filepath.Join(result.Config.OutDir(), "target/product/test_device/obj/PACKAGING/system_intermediates/staging_dir.stamp") + fileListFile := filepath.Join(result.Config.OutDir(), "target/product/test_device/obj/PACKAGING/system_intermediates/file_list.txt") + android.AssertStringListContains(t, "deps of filesystem must include the staging dir stamp file", output.Implicits.Strings(), stampFile) + android.AssertStringListContains(t, "deps of filesystem must include the staging dir file list", output.Implicits.Strings(), fileListFile) +} + func TestFileSystemFillsLinkerConfigWithStubLibs(t *testing.T) { result := fixture.RunTestWithBp(t, ` android_system_image { @@ -270,7 +287,7 @@ func TestFileSystemShouldInstallCoreVariantIfTargetBuildAppsIsSet(t *testing.T) } `) - inputs := result.ModuleForTests("myfilesystem", "android_common").Output("deps.zip").Implicits + inputs := result.ModuleForTests("myfilesystem", "android_common").Output("myfilesystem.img").Implicits android.AssertStringListContains(t, "filesystem should have libbar even for unbundled build", inputs.Strings(), "out/soong/.intermediates/libbar/android_arm64_armv8-a_shared/libbar.so") @@ -314,7 +331,7 @@ func TestFileSystemWithCoverageVariants(t *testing.T) { `) filesystem := result.ModuleForTests("myfilesystem", "android_common_cov") - inputs := filesystem.Output("deps.zip").Implicits + inputs := filesystem.Output("myfilesystem.img").Implicits android.AssertStringListContains(t, "filesystem should have libfoo(cov)", inputs.Strings(), "out/soong/.intermediates/libfoo/android_arm64_armv8-a_shared_cov/libfoo.so") |