From 00eca78d289dfd1b14bf0a2f95992e8bb7b455da Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Sat, 10 Aug 2024 23:17:40 +0100 Subject: [PATCH] Tests+CI: Remove WPT CI job This currently fails on CI, but gives no indication that it has failed. --- .github/workflows/lagom-template.yml | 10 - ...ct-name-to-update-metadata-fallback-.patch | 22 -- Tests/LibWeb/WPT/concat-extract-metadata.py | 76 ---- Tests/LibWeb/WPT/include.ini | 7 - Tests/LibWeb/WPT/metadata.txt | 349 ------------------ Tests/LibWeb/WPT/run.sh | 105 ------ 6 files changed, 569 deletions(-) delete mode 100644 Tests/LibWeb/WPT/0001-tools-Pass-product-name-to-update-metadata-fallback-.patch delete mode 100755 Tests/LibWeb/WPT/concat-extract-metadata.py delete mode 100644 Tests/LibWeb/WPT/include.ini delete mode 100644 Tests/LibWeb/WPT/metadata.txt delete mode 100755 Tests/LibWeb/WPT/run.sh diff --git a/.github/workflows/lagom-template.yml b/.github/workflows/lagom-template.yml index 482b82126a5..fd6c41b4911 100644 --- a/.github/workflows/lagom-template.yml +++ b/.github/workflows/lagom-template.yml @@ -181,16 +181,6 @@ jobs: retention-days: 7 if-no-files-found: ignore - - name: WPT - # FIXME: #1 Figure out why the WebDriver doesn't start when building with GCC on Linux - if: ${{ inputs.os_name == 'Linux' && inputs.fuzzer == 'NO_FUZZ' && inputs.toolchain != 'GNU' }} - working-directory: ${{ github.workspace }}/Tests/LibWeb/WPT - run: ./run.sh --remove-wpt-repository - env: - QT_QPA_PLATFORM: 'offscreen' - ASAN_OPTIONS: 'strict_string_checks=1:check_initialization_order=1:strict_init_order=1:detect_stack_use_after_return=1:allocator_may_return_null=1' - UBSAN_OPTIONS: 'print_stacktrace=1:print_summary=1:halt_on_error=1' - - name: Lints if: ${{ inputs.os_name == 'Linux' && inputs.fuzzer == 'NO_FUZZ' }} working-directory: ${{ github.workspace }} diff --git a/Tests/LibWeb/WPT/0001-tools-Pass-product-name-to-update-metadata-fallback-.patch b/Tests/LibWeb/WPT/0001-tools-Pass-product-name-to-update-metadata-fallback-.patch deleted file mode 100644 index 4d8e4c22862..00000000000 --- a/Tests/LibWeb/WPT/0001-tools-Pass-product-name-to-update-metadata-fallback-.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Andrew Kaster -Date: Tue, 13 Feb 2024 12:31:25 -0700 -Subject: [PATCH] tools: Pass product name to update-metadata fallback path - ---- - tools/wpt/update.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/wpt/update.py b/tools/wpt/update.py -index 4dba7e69df8376e7e8566525ab083e6e0348a92f..17cd74e37fd79b839167feedc105ce986e89322e 100644 ---- a/tools/wpt/update.py -+++ b/tools/wpt/update.py -@@ -44,7 +44,7 @@ def update_expectations(_, **kwargs): - update_properties = metadata.get_properties(properties_file=kwargs["properties_file"], - extra_properties=kwargs["extra_property"], - config=kwargs["config"], -- product=kwargs["product"]) -+ product=kwargs["product"].name) - - manifest_update(kwargs["test_paths"]) - metadata.update_expected(kwargs["test_paths"], diff --git a/Tests/LibWeb/WPT/concat-extract-metadata.py b/Tests/LibWeb/WPT/concat-extract-metadata.py deleted file mode 100755 index c15ee1aab2b..00000000000 --- a/Tests/LibWeb/WPT/concat-extract-metadata.py +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env python3 - -""" -Usage: - -- To concatenate all WPT expectation files in the metadata directory into metadata.tx: - concat-extract-metadata.py --concat metadata > metadata.txt - -- To extract expectation files from metadata.txt into the metadata directory: - concat-extract-metadata.py --extract metadata.txt metadata -""" - -import argparse -import os - - -def concat_metadata_files(metadata_directory): - concatenated_metadata = "" - - for root, _, files in os.walk(metadata_directory): - for filename in files: - if filename.endswith(".ini"): - filepath = os.path.join(root, filename) - relative_path = os.path.relpath(filepath, metadata_directory) - with open(filepath, "r") as file: - file_content = file.read() - concatenated_metadata += f"--- {relative_path} ---\n" - concatenated_metadata += file_content + "\n" - - return concatenated_metadata - - -def extract_metadata_files(concatenated_metadata_file, output_metadata_directory): - with open(concatenated_metadata_file, "r") as file: - concatenated_metadata = file.read() - - lines = concatenated_metadata.splitlines() - - current_filename = None - current_content = [] - - def flush_content_to_file(filename, content, output_directory): - filepath = os.path.join(output_directory, filename) - os.makedirs(os.path.dirname(filepath), exist_ok=True) - with open(filepath, "w") as file: - file.write("\n".join(content)) - return filepath - - for line in lines: - if line.startswith("---"): - if current_filename: - flush_content_to_file(current_filename, current_content, output_metadata_directory) - - current_filename = line[4:-4].strip() - current_content = [] - else: - current_content.append(line) - - if current_filename: - flush_content_to_file(current_filename, current_content, output_metadata_directory) - - -parser = argparse.ArgumentParser(description="Concatenate and extract WPT metadata files") - -parser.add_argument("--concat", help="Concatenate expectation files from specified directory") -parser.add_argument("--extract", nargs=2, help="Extract expectation files from specified input concatenated file") - -args = parser.parse_args() - -if args.concat: - metadata_directory_path = args.concat - print(concat_metadata_files(metadata_directory_path)) - -if args.extract: - input_concatenated_metadata_filename, output_metadata_directory = args.extract - extract_metadata_files(input_concatenated_metadata_filename, output_metadata_directory) diff --git a/Tests/LibWeb/WPT/include.ini b/Tests/LibWeb/WPT/include.ini deleted file mode 100644 index e0d98e962a2..00000000000 --- a/Tests/LibWeb/WPT/include.ini +++ /dev/null @@ -1,7 +0,0 @@ -skip: true -[css] - skip: true - [CSS2] - skip: true - [floats] - skip: false diff --git a/Tests/LibWeb/WPT/metadata.txt b/Tests/LibWeb/WPT/metadata.txt deleted file mode 100644 index c8ba5c5414e..00000000000 --- a/Tests/LibWeb/WPT/metadata.txt +++ /dev/null @@ -1,349 +0,0 @@ ---- css/CSS2/floats/floats-wrap-bfc-with-margin-003.tentative.html.ini --- -[floats-wrap-bfc-with-margin-003.tentative.html] - expected: FAIL - ---- css/CSS2/floats/float-nowrap-2.html.ini --- -[float-nowrap-2.html] - expected: FAIL - ---- css/CSS2/floats/float-nowrap-3.html.ini --- -[float-nowrap-3.html] - expected: FAIL - ---- css/CSS2/floats/floats-placement-vertical-001c.xht.ini --- -[floats-placement-vertical-001c.xht] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-bfc-outside-001.xht.ini --- -[floats-wrap-bfc-outside-001.xht] - expected: FAIL - ---- css/CSS2/floats/floats-rule3-outside-right-001.xht.ini --- -[floats-rule3-outside-right-001.xht] - expected: FAIL - ---- css/CSS2/floats/overhanging-float-paint-order.html.ini --- -[overhanging-float-paint-order.html] - expected: FAIL - ---- css/CSS2/floats/float-nowrap-8.html.ini --- -[float-nowrap-8.html] - expected: FAIL - ---- css/CSS2/floats/float-nowrap-9.html.ini --- -[float-nowrap-9.html] - expected: FAIL - - ---- css/CSS2/floats/floats-wrap-top-below-bfc-002l.xht.ini --- -[floats-wrap-top-below-bfc-002l.xht] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-top-below-bfc-003l.xht.ini --- -[floats-wrap-top-below-bfc-003l.xht] - expected: FAIL - ---- css/CSS2/floats/float-in-nested-multicol-001.html.ini --- -[float-in-nested-multicol-001.html] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-bfc-003-right-table.xht.ini --- -[floats-wrap-bfc-003-right-table.xht] - expected: FAIL - ---- css/CSS2/floats/new-fc-relayout.html.ini --- -[new-fc-relayout.html] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-bfc-002-right-table.xht.ini --- -[floats-wrap-bfc-002-right-table.xht] - expected: FAIL - ---- css/CSS2/floats/new-fc-beside-adjoining-float.html.ini --- -[new-fc-beside-adjoining-float.html] - expected: PASS - ---- css/CSS2/floats/new-fc-beside-adjoining-float-2.html.ini --- -[new-fc-beside-adjoining-float-2.html] - expected: PASS - ---- css/CSS2/floats/floats-placement-vertical-001b.xht.ini --- -[floats-placement-vertical-001b.xht] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-bfc-with-margin-006.tentative.html.ini --- -[floats-wrap-bfc-with-margin-006.tentative.html] - expected: FAIL - ---- css/CSS2/floats/remove-block-between-inline-and-float.html.ini --- -[remove-block-between-inline-and-float.html] - expected: FAIL - ---- css/CSS2/floats/computed-float-position-absolute.html.ini --- -[computed-float-position-absolute.html] - [The computed value of float with absolute positioning when there is no box should be "none"] - expected: FAIL - ---- css/CSS2/floats/zero-width-floats.html.ini --- -[zero-width-floats.html] - expected: FAIL - ---- css/CSS2/floats/hit-test-floats-003.html.ini --- -[hit-test-floats-003.html] - [Miss float below something else] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-top-below-bfc-003r.xht.ini --- -[floats-wrap-top-below-bfc-003r.xht] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-top-below-bfc-002r.xht.ini --- -[floats-wrap-top-below-bfc-002r.xht] - expected: FAIL - ---- css/CSS2/floats/float-nowrap-5.html.ini --- -[float-nowrap-5.html] - expected: FAIL - ---- css/CSS2/floats/float-nowrap-4.html.ini --- -[float-nowrap-4.html] - expected: FAIL - ---- css/CSS2/floats/floats-placement-vertical-001a.xht.ini --- -[floats-placement-vertical-001a.xht] - expected: FAIL - ---- css/CSS2/floats/overflow-scroll-float-paint-order.html.ini --- -[overflow-scroll-float-paint-order.html] - expected: FAIL - ---- css/CSS2/floats/floats-rule3-outside-left-001.xht.ini --- -[floats-rule3-outside-left-001.xht] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-top-below-inline-002l.xht.ini --- -[floats-wrap-top-below-inline-002l.xht] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-top-below-inline-003l.xht.ini --- -[floats-wrap-top-below-inline-003l.xht] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-bfc-002-right-overflow.xht.ini --- -[floats-wrap-bfc-002-right-overflow.xht] - expected: FAIL - ---- css/CSS2/floats/zero-width-floats-positioning.tentative.html.ini --- -[zero-width-floats-positioning.tentative.html] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-bfc-with-margin-001a.tentative.html.ini --- -[floats-wrap-bfc-with-margin-001a.tentative.html] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-bfc-006.xht.ini --- -[floats-wrap-bfc-006.xht] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-bfc-003-left-table.xht.ini --- -[floats-wrap-bfc-003-left-table.xht] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-bfc-008.html.ini --- -[floats-wrap-bfc-008.html] - expected: FAIL - ---- css/CSS2/floats/new-fc-separates-from-float-2.html.ini --- -[new-fc-separates-from-float-2.html] - expected: FAIL - ---- css/CSS2/floats/new-fc-separates-from-float-3.html.ini --- -[new-fc-separates-from-float-3.html] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-top-below-bfc-001l.xht.ini --- -[floats-wrap-top-below-bfc-001l.xht] - expected: FAIL - ---- css/CSS2/floats/floats-zero-height-wrap-002.xht.ini --- -[floats-zero-height-wrap-002.xht] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-bfc-with-margin-001.html.ini --- -[floats-wrap-bfc-with-margin-001.html] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-bfc-001-right-overflow.xht.ini --- -[floats-wrap-bfc-001-right-overflow.xht] - expected: FAIL - ---- css/CSS2/floats/new-fc-separates-from-float.html.ini --- -[new-fc-separates-from-float.html] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-bfc-005.xht.ini --- -[floats-wrap-bfc-005.xht] - expected: FAIL - ---- css/CSS2/floats/float-no-content-beside-001.html.ini --- -[float-no-content-beside-001.html] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-top-below-bfc-001r.xht.ini --- -[floats-wrap-top-below-bfc-001r.xht] - expected: FAIL - ---- css/CSS2/floats/float-nowrap-6.html.ini --- -[float-nowrap-6.html] - expected: FAIL - ---- css/CSS2/floats/float-nowrap-7.html.ini --- -[float-nowrap-7.html] - expected: FAIL - ---- css/CSS2/floats/hit-test-floats-001.html.ini --- -[hit-test-floats-001.html] - [hit-test-floats-001] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-bfc-with-margin-002.tentative.html.ini --- -[floats-wrap-bfc-with-margin-002.tentative.html] - expected: FAIL - ---- css/CSS2/floats/float-nowrap-3-ref.html.ini --- -[float-nowrap-3-ref.html] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-top-below-inline-003r.xht.ini --- -[floats-wrap-top-below-inline-003r.xht] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-top-below-inline-002r.xht.ini --- -[floats-wrap-top-below-inline-002r.xht] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-bfc-003-right-overflow.xht.ini --- -[floats-wrap-bfc-003-right-overflow.xht] - expected: FAIL - ---- css/CSS2/floats/floats-zero-height-wrap-001.xht.ini --- -[floats-zero-height-wrap-001.xht] - expected: FAIL - ---- css/CSS2/floats/zero-space-between-floats-004.html.ini --- -[zero-space-between-floats-004.html] - [#container 1] - expected: FAIL - ---- css/CSS2/floats/float-no-interpolation.html.ini --- -[float-no-interpolation.html] - [Web Animations: property from [initial\] to [right\] at (0.5) should be [right\]] - expected: FAIL - - [Web Animations: property from [initial\] to [right\] at (0.6) should be [right\]] - expected: FAIL - - [Web Animations: property from [initial\] to [right\] at (1) should be [right\]] - expected: FAIL - - [Web Animations: property from [initial\] to [right\] at (1.5) should be [right\]] - expected: FAIL - - [CSS Transitions: property from [left\] to [right\] at (-1) should be [left\]] - expected: FAIL - - [CSS Transitions: property from [left\] to [right\] at (0) should be [left\]] - expected: FAIL - - [CSS Transitions: property from [left\] to [right\] at (0.4) should be [left\]] - expected: FAIL - - [CSS Transitions with transition: all: property from [left\] to [right\] at (-1) should be [left\]] - expected: FAIL - - [CSS Transitions with transition: all: property from [left\] to [right\] at (0) should be [left\]] - expected: FAIL - - [CSS Transitions with transition: all: property from [left\] to [right\] at (0.4) should be [left\]] - expected: FAIL - - [Web Animations: property from [left\] to [right\] at (-1) should be [left\]] - expected: FAIL - - [Web Animations: property from [left\] to [right\] at (0) should be [left\]] - expected: FAIL - - [Web Animations: property from [left\] to [right\] at (0.4) should be [left\]] - expected: FAIL - - [Web Animations: property from [left\] to [right\] at (0.5) should be [right\]] - expected: FAIL - - [Web Animations: property from [left\] to [right\] at (1) should be [right\]] - expected: FAIL - - [Web Animations: property from [left\] to [right\] at (1.5) should be [right\]] - expected: FAIL - - [CSS Transitions with transition-behavior:allow-discrete: property from [initial\] to [right\] at (-0.3) should be [initial\]] - expected: FAIL - - [CSS Transitions with transition-behavior:allow-discrete: property from [initial\] to [right\] at (0) should be [initial\]] - expected: FAIL - - [CSS Transitions with transition-behavior:allow-discrete: property from [initial\] to [right\] at (0.3) should be [initial\]] - expected: FAIL - - [CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property from [initial\] to [right\] at (-0.3) should be [initial\]] - expected: FAIL - - [CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property from [initial\] to [right\] at (0) should be [initial\]] - expected: FAIL - - [CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property from [initial\] to [right\] at (0.3) should be [initial\]] - expected: FAIL - - [CSS Animations: property from [initial\] to [right\] at (-0.3) should be [initial\]] - expected: FAIL - - [CSS Animations: property from [initial\] to [right\] at (0) should be [initial\]] - expected: FAIL - - [CSS Animations: property from [initial\] to [right\] at (0.3) should be [initial\]] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-bfc-004.xht.ini --- -[floats-wrap-bfc-004.xht] - expected: FAIL - ---- css/CSS2/floats/float-with-absolutely-positioned-child-with-static-inset.html.ini --- -[float-with-absolutely-positioned-child-with-static-inset.html] - expected: FAIL - ---- css/CSS2/floats/floats-in-table-caption-001.html.ini --- -[floats-in-table-caption-001.html] - expected: FAIL - ---- css/CSS2/floats/floats-line-wrap-shifted-001.html.ini --- -[floats-line-wrap-shifted-001.html] - expected: FAIL - ---- css/CSS2/floats/floats-placement-003.html.ini --- -[floats-placement-003.html] - expected: FAIL - ---- css/CSS2/floats/floats-placement-005.html.ini --- -[floats-placement-005.html] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-bfc-007.xht.ini --- -[floats-wrap-bfc-007.xht] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-bfc-with-margin-004.html.ini --- -[floats-wrap-bfc-with-margin-004.html] - expected: FAIL - ---- css/CSS2/floats/floats-wrap-bfc-with-margin-005.html.ini --- -[floats-wrap-bfc-with-margin-005.html] - expected: FAIL diff --git a/Tests/LibWeb/WPT/run.sh b/Tests/LibWeb/WPT/run.sh deleted file mode 100755 index 94e2e7012cb..00000000000 --- a/Tests/LibWeb/WPT/run.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -SCRIPT_DIR="$(realpath "$(dirname "${BASH_SOURCE[0]}")")" - -if [ -z "$LADYBIRD_SOURCE_DIR" ] -then - LADYBIRD_SOURCE_DIR="$(realpath "${SCRIPT_DIR}/../../../")" - export LADYBIRD_SOURCE_DIR -fi - - -: "${WEBDRIVER_BINARY:=$(env PATH="${LADYBIRD_SOURCE_DIR}/Build/ladybird/bin/Ladybird.app/Contents/MacOS:${LADYBIRD_SOURCE_DIR}/Build/ladybird/bin:${LADYBIRD_SOURCE_DIR}/Build/bin:${PATH}" \ - which WebDriver)}" -update_expectations_metadata=false -remove_wpt_repository=false -# Generate name for file with wpt run log -wpt_run_log_filename="$(mktemp)" - -for arg in "$@"; do - case $arg in - --webdriver-binary=*) - WEBDRIVER_BINARY="$(realpath "${arg#*=}")" - shift - ;; - --update-expectations-metadata) - update_expectations_metadata=true - shift - ;; - --remove-wpt-repository) - remove_wpt_repository=true - shift - ;; - --log-file=*) - wpt_run_log_filename="$(realpath "${arg#*=}")" - shift - ;; - -*) - echo "Unknown argument $arg" - exit 1 - ;; - *) - TEST_FILE=$(realpath "$arg") - TEST_FILES+=("$TEST_FILE") - shift - ;; - esac -done - -if [ -z "$WEBDRIVER_BINARY" ]; then - echo "Unable to find WebDriver binary, did you build Ladybird?" - exit 1 -fi - -pushd "${SCRIPT_DIR}" - -if [ ! -d "${SCRIPT_DIR}/wpt" ]; then - # Clone patched web-platform-tests repository - mkdir wpt - git -C wpt init - git -C wpt remote add origin https://github.com/web-platform-tests/wpt.git - - # Switch to the commit that was used to generate tests expectations. Requires periodic updates. - git -C wpt fetch --depth 1 origin 5930e386a5e1e59456dc810c9b21adf18bc1b6fe - git -C wpt checkout FETCH_HEAD - - git apply 0001-tools-Pass-product-name-to-update-metadata-fallback-.patch - - # Update hosts file if needed - if [ "$(comm -13 <(sort -u /etc/hosts) <(python3 ./wpt/wpt make-hosts-file | sort -u) | wc -l)" -gt 0 ]; then - echo "Enter superuser password to append wpt hosts to /etc/hosts" - python3 "./wpt/wpt" make-hosts-file | sudo tee -a /etc/hosts - fi -fi - -# Extract metadata.txt into directory with expectation files expected by WPT runner -python3 ./concat-extract-metadata.py --extract metadata.txt metadata - -# Run tests. -python3 ./wpt/wpt run \ - --webdriver-binary "${WEBDRIVER_BINARY}" \ - --no-fail-on-unexpected \ - --no-fail-on-unexpected-pass \ - --skip-timeout \ - --include-manifest include.ini \ - --metadata ./metadata \ - --manifest ./MANIFEST.json \ - --webdriver-arg="--certificate=${PWD}/wpt/tools/certs/cacert.pem" \ - --webdriver-arg="--certificate=${LADYBIRD_SOURCE_DIR}/Build/lagom/cacert.pem" \ - --log-raw "${wpt_run_log_filename}" \ - ladybird \ - ${TEST_FILES:+"${TEST_FILES[@]}"} - -# Update expectations metadata files if requested -if [[ $update_expectations_metadata == true ]]; then - python3 ./wpt/wpt update-expectations --product ladybird --metadata ./metadata --manifest ./MANIFEST.json "${wpt_run_log_filename}" - python3 ./concat-extract-metadata.py --concat ./metadata > metadata.txt -fi - -if [[ $remove_wpt_repository == true ]]; then - rm -rf wpt -fi - -popd