From 06e2aab4a7351c1587d127f8920dad9542471d85 Mon Sep 17 00:00:00 2001 From: Sherry Zhou Date: Wed, 24 Apr 2024 01:38:22 +0800 Subject: [PATCH] Enable wpt in all linux builds (#3010) b/332367155 (cherry picked from commit fba6e38d16a2f5f6253b69e3452a8c0519de0cc4) --- .github/config/linux-clang-3-9.json | 2 +- .github/config/linux-gcc-6-3.json | 2 +- .github/config/linux-modular.json | 3 ++- .../x64x11/clang/3.9/cobalt/configuration.py | 16 ++++++++++++++++ .../linux/x64x11/gcc/6.3/cobalt/configuration.py | 16 ++++++++++++++++ 5 files changed, 36 insertions(+), 3 deletions(-) diff --git a/.github/config/linux-clang-3-9.json b/.github/config/linux-clang-3-9.json index 246db3d01d23..98e4f1a03982 100644 --- a/.github/config/linux-clang-3-9.json +++ b/.github/config/linux-clang-3-9.json @@ -1,7 +1,7 @@ { "docker_service": "build-linux-clang-3-9", "on_host_test": true, - "on_host_test_shards": ["0", "1", "2", "3"], + "on_host_test_shards": ["0", "1", "2", "3", "wpt"], "platforms": [ "linux-x64x11-clang-3-9" ], diff --git a/.github/config/linux-gcc-6-3.json b/.github/config/linux-gcc-6-3.json index e2fcd24238f4..81901124f143 100644 --- a/.github/config/linux-gcc-6-3.json +++ b/.github/config/linux-gcc-6-3.json @@ -1,7 +1,7 @@ { "docker_service": "build-linux-gcc", "on_host_test": true, - "on_host_test_shards": ["0", "1", "2", "3"], + "on_host_test_shards": ["0", "1", "2", "3", "wpt"], "platforms": [ "linux-x64x11-gcc-6-3" ], diff --git a/.github/config/linux-modular.json b/.github/config/linux-modular.json index f029ce679182..1f25e62beb6f 100644 --- a/.github/config/linux-modular.json +++ b/.github/config/linux-modular.json @@ -5,7 +5,8 @@ "0", "1", "2", - "3" + "3", + "wpt" ], "platforms": [ "linux-x64x11-modular" diff --git a/starboard/linux/x64x11/clang/3.9/cobalt/configuration.py b/starboard/linux/x64x11/clang/3.9/cobalt/configuration.py index 5751d84cef6b..fa7cbfd351d7 100644 --- a/starboard/linux/x64x11/clang/3.9/cobalt/configuration.py +++ b/starboard/linux/x64x11/clang/3.9/cobalt/configuration.py @@ -27,6 +27,22 @@ def GetTestFilters(self): filters.extend(test_filter.TestFilter(target, test) for test in tests) return filters + def GetWebPlatformTestFilters(self): + filters = super().GetWebPlatformTestFilters() + for target, tests in self.__FILTERED_WPT_TESTS.items(): + filters.extend(test_filter.TestFilter(target, test) for test in tests) + return filters + + # pylint: disable=line-too-long + __FILTERED_WPT_TESTS = { # pylint: disable=invalid-name + 'web_platform_tests': [ + # TODO(b/332367155): Re-enable web_platform_tests once fixed. + 'xhr/WebPlatformTest.Run/XMLHttpRequest_send_sync_blocks_async_htm', + 'dom/WebPlatformTest.Run/dom_nodes_MutationObserver_attributes_html', + 'html/WebPlatformTest.Run/html_dom_documents_dom_tree_accessors_Document_currentScript_sub_html', + ], + } + # A map of failing or crashing tests per target. __FILTERED_TESTS = { # pylint: disable=invalid-name 'base_unittests': [ diff --git a/starboard/linux/x64x11/gcc/6.3/cobalt/configuration.py b/starboard/linux/x64x11/gcc/6.3/cobalt/configuration.py index 67e2f45568ff..c86d316c610c 100644 --- a/starboard/linux/x64x11/gcc/6.3/cobalt/configuration.py +++ b/starboard/linux/x64x11/gcc/6.3/cobalt/configuration.py @@ -29,6 +29,22 @@ def GetTestFilters(self): filters.extend(test_filter.TestFilter(target, test) for test in tests) return filters + def GetWebPlatformTestFilters(self): + filters = super().GetWebPlatformTestFilters() + for target, tests in self.__FILTERED_WPT_TESTS.items(): + filters.extend(test_filter.TestFilter(target, test) for test in tests) + return filters + + # pylint: disable=line-too-long + __FILTERED_WPT_TESTS = { # pylint: disable=invalid-name + 'web_platform_tests': [ + # TODO(b/332367155): Re-enable web_platform_tests once fixed. + 'xhr/WebPlatformTest.Run/XMLHttpRequest_send_sync_blocks_async_htm', + 'dom/WebPlatformTest.Run/dom_nodes_MutationObserver_attributes_html', + 'html/WebPlatformTest.Run/html_dom_documents_dom_tree_accessors_Document_currentScript_sub_html', + ], + } + # A map of failing or crashing tests per target. __FILTERED_TESTS = { # pylint: disable=invalid-name 'base_unittests': [