From 17a49342c610736d9d77a5b24950ffc74d8e73ea Mon Sep 17 00:00:00 2001 From: Miguel Casas-Sanchez Date: Thu, 6 Mar 2025 09:10:25 -0800 Subject: [PATCH 1/2] Follow up to https://github.com/youtube/cobalt/pull/4831 -- starboard_unittests_wrapper --- .../targets/linux-x64x11/test_targets.json | 4 +-- starboard/BUILD.gn | 36 +++++++++---------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/cobalt/build/testing/targets/linux-x64x11/test_targets.json b/cobalt/build/testing/targets/linux-x64x11/test_targets.json index 170692ff436f..7e1f1160c95c 100644 --- a/cobalt/build/testing/targets/linux-x64x11/test_targets.json +++ b/cobalt/build/testing/targets/linux-x64x11/test_targets.json @@ -27,7 +27,7 @@ "services/service_manager/tests:service_manager_unittests", "skia:skia_unittests", "sql:sql_unittests", - "starboard:starboard_unittests", + "starboard:starboard_unittests_wrapper", "ui/ozone:ozone_unittests", "ui/wm:wm_unittests", "url:url_perftests", @@ -62,7 +62,7 @@ "out/linux-x64x11_devel/service_manager_unittests", "out/linux-x64x11_devel/skia_unittests", "out/linux-x64x11_devel/sql_unittests", - "out/linux-x64x11_devel/starboard_unittests", + "out/linux-x64x11_devel/starboard/starboard_unittests", "out/linux-x64x11_devel/wm_unittests", "out/linux-x64x11_devel/url_perftests", "out/linux-x64x11_devel/url_unittests", diff --git a/starboard/BUILD.gn b/starboard/BUILD.gn index 7370c1a1e0c7..a9f549a7d410 100644 --- a/starboard/BUILD.gn +++ b/starboard/BUILD.gn @@ -291,27 +291,25 @@ if (current_toolchain == starboard_toolchain) { public_deps += [ "//$starboard_path:starboard_platform_with_main" ] } } -} -# TODO(b/384819454): Move this guy to the block above and define here a -# group("starboard_unittests_wrapper") { -# testonly = true -# deps = [ ":starboard_unittests($starboard_toolchain)" ] -# } -# then modify //cobalt/build/...test_targets.json to point to it instead of -# starboard_unittests directly. -test("starboard_unittests") { - deps = [ "//starboard/common:common_test" ] - if (sb_is_evergreen_compatible) { - deps += [ - "//starboard/client_porting/eztime:eztime_test", - "//starboard/extension:extension_test", - "//starboard/loader_app:app_key_files_test", - "//starboard/loader_app:app_key_test", - "//starboard/loader_app:drain_file_test", + test("starboard_unittests") { + deps = [ + "//starboard/common:common_test", + "//starboard/elf_loader:elf_loader_test", ] - if (current_toolchain == starboard_toolchain) { - deps += [ "//starboard/elf_loader:elf_loader_test" ] + if (sb_is_evergreen_compatible) { + deps += [ + "//starboard/client_porting/eztime:eztime_test", + "//starboard/extension:extension_test", + "//starboard/loader_app:app_key_files_test", + "//starboard/loader_app:app_key_test", + "//starboard/loader_app:drain_file_test", + ] } } } + +group("starboard_unittests_wrapper") { + testonly = true + deps = [ ":starboard_unittests($starboard_toolchain)" ] +} From 4a5fb6f05ad7f039d0cebd518ab5d6f7330afc38 Mon Sep 17 00:00:00 2001 From: Miguel Casas-Sanchez Date: Thu, 6 Mar 2025 17:55:03 -0800 Subject: [PATCH 2/2] Fix Android build --- starboard/BUILD.gn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/starboard/BUILD.gn b/starboard/BUILD.gn index a9f549a7d410..716f242c3795 100644 --- a/starboard/BUILD.gn +++ b/starboard/BUILD.gn @@ -293,10 +293,10 @@ if (current_toolchain == starboard_toolchain) { } test("starboard_unittests") { - deps = [ - "//starboard/common:common_test", - "//starboard/elf_loader:elf_loader_test", - ] + deps = [ "//starboard/common:common_test" ] + if (!is_android) { + deps += [ "//starboard/elf_loader:elf_loader_test" ] + } if (sb_is_evergreen_compatible) { deps += [ "//starboard/client_porting/eztime:eztime_test",