mirror of
https://github.com/servo/servo.git
synced 2025-08-23 14:25:33 +01:00
ci: Run devtools tests whenever we run unit tests (#38614)
this patch updates linux.yml, mac.yml, and windows.yml to run the devtools test suite (#36325), whenever unit tests are enabled in those workflows. plus three changes that speed up the tests from 73 → 65 → 56 → 51 seconds: - we replace the hardcoded sleep(1) after starting servoshell with a loop that waits until the devtools port is open (this also fixes intermittent failures when servoshell starts too slowly, especially on macOS) - we start the internal web servers once, and reuse them across all tests - we run servoshell in headless mode (this is also required because most CI runners have no GUI) finally we fix two bugs that cause very noisy but not very interesting error messages: - in the test code, we use a [context manager](https://docs.python.org/3/reference/datamodel.html#context-managers) to ensure the devtools client is disconnected unconditionally, even if test methods or assert helper methods raise exceptions (this was causing errors on all platforms) - in the devtools server, we treat “connection reset” errors when reading from the client like a normal EOF, rather than as a failure (this was causing errors on Windows) on self-hosted linux builds, there are still spurious error messages like the following, but we can fix them later: ``` error: XDG_RUNTIME_DIR not set in the environment. libEGL warning: egl: failed to create dri2 screen ``` Testing: this patch effectively adds 44 tests to CI Fixes: #36325 --------- Signed-off-by: Delan Azabani <dazabani@igalia.com> Signed-off-by: atbrakhi <atbrakhi@igalia.com> Co-authored-by: atbrakhi <atbrakhi@igalia.com>
This commit is contained in:
parent
141413d52e
commit
47aa9ea8cf
6 changed files with 288 additions and 233 deletions
3
.github/workflows/linux.yml
vendored
3
.github/workflows/linux.yml
vendored
|
@ -190,6 +190,9 @@ jobs:
|
|||
timeout_minutes: 20
|
||||
max_attempts: 2 # https://github.com/servo/servo/issues/30683
|
||||
command: ./mach test-unit --${{ inputs.profile }}
|
||||
- name: Devtools tests
|
||||
if: ${{ inputs.unit-tests }}
|
||||
run: ./mach test-devtools --${{ inputs.profile }}
|
||||
- name: Build libservo with examples
|
||||
if: ${{ inputs.build-libservo }}
|
||||
continue-on-error: true
|
||||
|
|
3
.github/workflows/mac.yml
vendored
3
.github/workflows/mac.yml
vendored
|
@ -174,6 +174,9 @@ jobs:
|
|||
timeout_minutes: 40 # https://github.com/servo/servo/issues/30275
|
||||
max_attempts: 3 # https://github.com/servo/servo/issues/30683
|
||||
command: ./mach test-unit --${{ inputs.profile }}
|
||||
- name: Devtools tests
|
||||
if: ${{ inputs.unit-tests }}
|
||||
run: ./mach test-devtools --${{ inputs.profile }}
|
||||
- name: Build libservo with examples
|
||||
if: ${{ inputs.build-libservo }}
|
||||
continue-on-error: true
|
||||
|
|
3
.github/workflows/windows.yml
vendored
3
.github/workflows/windows.yml
vendored
|
@ -187,6 +187,9 @@ jobs:
|
|||
timeout_minutes: 30
|
||||
max_attempts: 3 # https://github.com/servo/servo/issues/30683
|
||||
command: .\mach test-unit --${{ inputs.profile }} -- -- --test-threads=1
|
||||
- name: Devtools tests
|
||||
if: ${{ inputs.unit-tests }}
|
||||
run: .\mach test-devtools --${{ inputs.profile }}
|
||||
- name: Build libservo with examples
|
||||
if: ${{ inputs.build-libservo }}
|
||||
continue-on-error: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue