From b3670c503db13d4349d0b1a661c2bf566ba16e48 Mon Sep 17 00:00:00 2001 From: sagudev <16504129+sagudev@users.noreply.github.com> Date: Mon, 24 Apr 2023 14:22:41 +0200 Subject: [PATCH 1/3] Allow wpt commands to accept --with-layout-2013 --- python/wpt/__init__.py | 2 ++ python/wpt/importer/__init__.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/python/wpt/__init__.py b/python/wpt/__init__.py index 4369e147822..a1ecf5001c3 100644 --- a/python/wpt/__init__.py +++ b/python/wpt/__init__.py @@ -33,6 +33,8 @@ def create_parser(): help="Pass preferences to servo") parser.add_argument('--layout-2020', '--with-layout-2020', default=False, action="store_true", help="Use expected results for the 2020 layout engine") + parser.add_argument('--layout-2013', '--with-layout-2013', default=True, + action="store_true", help="Use expected results for the 2013 layout engine") parser.add_argument('--log-servojson', action="append", type=mozlog.commandline.log_file, help="Servo's JSON logger of unexpected results") parser.add_argument('--always-succeed', default=False, action="store_true", diff --git a/python/wpt/importer/__init__.py b/python/wpt/importer/__init__.py index 7022b2a791f..789ee2b0a42 100644 --- a/python/wpt/importer/__init__.py +++ b/python/wpt/importer/__init__.py @@ -47,6 +47,8 @@ def create_parser(): parser = wptcommandline.create_parser_update() parser.add_argument("--layout-2020", "--with-layout-2020", default=False, action="store_true", help="Use expected results for the 2020 layout engine") + parser.add_argument("--layout-2013", "--with-layout-2013", default=True, action="store_true", + help="Use expected results for the 2013 layout engine") return parser From 8bed625d28fea9cd23e7721ae332b26f2a94e20d Mon Sep 17 00:00:00 2001 From: sagudev <16504129+sagudev@users.noreply.github.com> Date: Mon, 24 Apr 2023 10:29:57 +0200 Subject: [PATCH 2/3] Use defined layout for wpt test --- .github/workflows/linux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 517691d2e85..feca54e326c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -137,7 +137,7 @@ jobs: - name: Run tests if: ${{ inputs.wpt != 'sync' }} run: | - python3 ./mach test-wpt \ + python3 ./mach test-wpt --with-${{ env.LAYOUT }} \ --release --processes $(nproc) --timeout-multiplier 2 \ --total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \ --log-raw test-wpt.${{ matrix.chunk_id }}.log \ @@ -149,7 +149,7 @@ jobs: - name: Run tests (sync) if: ${{ inputs.wpt == 'sync' }} run: | - python3 ./mach test-wpt \ + python3 ./mach test-wpt --with-${{ env.LAYOUT }} \ --release --processes $(nproc) --timeout-multiplier 2 \ --total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \ --log-raw test-wpt.${{ matrix.chunk_id }}.log \ From 200f90cf9fd3e5c3ead1bd72fe5a522dba659498 Mon Sep 17 00:00:00 2001 From: sagudev <16504129+sagudev@users.noreply.github.com> Date: Mon, 24 Apr 2023 07:54:13 +0200 Subject: [PATCH 3/3] Add try-wpt-2020 runner --- .github/workflows/linux.yml | 10 +++++----- .github/workflows/quick-check.yml | 2 +- python/servo/devenv_commands.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index feca54e326c..6a9561d4a36 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -39,13 +39,13 @@ on: default: false type: boolean push: - branches: ["try-linux", "try-wpt"] + branches: ["try-linux", "try-wpt", "try-wpt-2020"] env: RUST_BACKTRACE: 1 SHELL: /bin/bash - LAYOUT: "${{ contains(inputs.layout, '2020') && 'layout-2020' || 'layout-2013' }}" - PACKAGE: "${{ contains(inputs.layout, '2020') && 'linux-layout2020' || 'linux' }}" + LAYOUT: "${{ (contains(inputs.layout, '2020') || github.ref_name == 'try-wpt-2020') && 'layout-2020' || 'layout-2013' }}" + PACKAGE: "${{ (contains(inputs.layout, '2020') || github.ref_name == 'try-wpt-2020') && 'linux-layout2020' || 'linux' }}" SCCACHE_GHA_ENABLED: "true" RUSTC_WRAPPER: "sccache" CCACHE: "sccache" @@ -102,7 +102,7 @@ jobs: path: target.tar.gz linux-wpt: - if: ${{ github.ref_name == 'try-wpt' || inputs.wpt }} + if: ${{ contains(github.ref_name, 'wpt') || inputs.wpt }} name: Linux WPT Tests runs-on: ubuntu-20.04 needs: ["build-linux"] @@ -183,7 +183,7 @@ jobs: report-test-results: name: Reporting test results runs-on: ubuntu-latest - if: ${{ always() && !cancelled() && success('build-linux') && (github.ref_name == 'try-wpt' || inputs.wpt == 'test') }} + if: ${{ always() && !cancelled() && success('build-linux') && (contains(github.ref_name, 'wpt') || inputs.wpt == 'test') }} needs: - "linux-wpt" steps: diff --git a/.github/workflows/quick-check.yml b/.github/workflows/quick-check.yml index a1244b6b9ce..0c48233c83d 100644 --- a/.github/workflows/quick-check.yml +++ b/.github/workflows/quick-check.yml @@ -5,7 +5,7 @@ name: Quick check on: push: branches: - ["**", "!master", "!auto", "!try", "!try-linux", "!try-mac", "!try-windows", "!try-wpt", "!dependabot/**"] + ["**", "!master", "!auto", "!try", "!try-linux", "!try-mac", "!try-windows", "!try-wpt", "!try-wpt-2020", "!dependabot/**"] jobs: build-linux: diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py index 47df6599b92..7d3481d1c19 100644 --- a/python/servo/devenv_commands.py +++ b/python/servo/devenv_commands.py @@ -352,7 +352,7 @@ class MachCommands(CommandBase): def try_jobs(self, jobs): branches = [] # we validate branches because force pushing is destructive - VALID_TRY_BRACHES = ["try", "try-linux", "try-mac", "try-windows", "try-wpt"] + VALID_TRY_BRACHES = ["try", "try-linux", "try-mac", "try-windows", "try-wpt", "try-wpt-2020"] for job in jobs: # branches must start with try- if "try" not in job: