Skip to content

cobalt/test: Enable dedicated browser tests action for CI - Linux#9260

Open
Awallky wants to merge 4 commits intoyoutube:mainfrom
Awallky:linux-chunk
Open

cobalt/test: Enable dedicated browser tests action for CI - Linux#9260
Awallky wants to merge 4 commits intoyoutube:mainfrom
Awallky:linux-chunk

Conversation

@Awallky
Copy link
Contributor

@Awallky Awallky commented Feb 26, 2026

This change introduces a dedicated GitHub Actions workflow to run
browser tests on the Linux platform. A new action is added to
orchestrate the execution of the cobalt_browsertests_runner within
a virtual display environment (xvfb-run) on a host machine.

The existing run_browser_tests.py script is enhanced to execute
individual browser tests in isolated processes and to aggregate
their JUnit XML output into a single report, improving robustness
and debuggability in CI. Build configurations are updated to
include the browser test runner for Linux. Artifact archiving now
standardizes tar ownership for reproducibility.

These changes ensure comprehensive test coverage for the Linux
platform by integrating browser tests into the continuous
integration pipeline. Some tests are conditionally disabled on
Starboard where known issues exist, allowing them to run on Linux.

Test: vpython3 cobalt/build/test_archive_test_artifacts.py
Test: vpython3 cobalt/testing/browser_tests/tools/test_collect_test_artifacts.py
Test: vpython3 cobalt/testing/browser_tests/test_run_browser_tests.py

Bug: 483488213
Bug: 473909665

@Awallky Awallky requested a review from a team as a code owner February 26, 2026 00:10
@github-actions
Copy link
Contributor

🤖 Gemini Suggested Commit Message


linux: Enable browser tests in CI

This change introduces a dedicated GitHub Actions workflow to run
browser tests on the Linux platform. A new action is added to
orchestrate the execution of the cobalt_browsertests_runner within
a virtual display environment (xvfb-run) on a host machine.

The existing run_browser_tests.py script is enhanced to execute
individual browser tests in isolated processes and to aggregate
their JUnit XML output into a single report, improving robustness
and debuggability in CI. Build configurations are updated to
include the browser test runner for Linux. Artifact archiving now
standardizes tar ownership for reproducibility.

These changes ensure comprehensive test coverage for the Linux
platform by integrating browser tests into the continuous
integration pipeline. Some tests are conditionally disabled on
Starboard where known issues exist, allowing them to run on Linux.

Bug: 483488213
Bug: 473909665

💡 Pro Tips for a Better Commit Message:

  1. Influence the Result: Want to change the output? You can write custom prompts or instructions directly in the Pull Request description. The model uses that text to generate the message.
  2. Re-run the Generator: Post a comment with: /generate-commit-message

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for running Linux browser tests in CI, refactoring run_browser_tests.py for robustness, and improving testing infrastructure. A significant security concern was identified due to the direct use of GitHub Actions expressions within shell scripts, which can lead to command injection vulnerabilities. Furthermore, the upload_test_artifacts action directly uses matrix context variables instead of action inputs, which is against best practices for reusable actions.

failed_tests = []
passed_count = 0

for i, test in enumerate(tests):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to manually do the sharding. See https://source.corp.google.com/h/github/youtube/cobalt/+/main:cobalt/testing/browser_tests/cobalt_browsertests_runner.sh

And also need to switch back the build target to the python file. See #8717 (sorry did not get time to land it yet).

@Awallky Awallky changed the title Linux chunk cobalt/test: Enable dedicated browser tests action for CI - Linux Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants