Skip to content

Fix GUI test runner on Windows - #3234

Open
kartik-py12 wants to merge 1 commit into
rust-lang:mainfrom
kartik-py12:fix-gui-tests-windows
Open

kartik-py12 wants to merge 1 commit into
rust-lang:mainfrom
kartik-py12:fix-gui-tests-windows

Conversation

@kartik-py12

Copy link
Copy Markdown

Fixes #3067.

cargo test --test gui fails on Windows before any test runs:

  • npm and npx are batch files there, so Command::new("npm") can't find them.
  • The browser-ui-test version was read from the second :-separated field of npm list --parseable --long, which is part of the path when it starts with a drive letter.
  • DOC_PATH was file:// plus a path with backslashes, which doesn't match the file:///C:/... location the browser reports in redirect.goml.

This fixes all three. Behavior on other platforms is unchanged.

I ran the suite on a GitHub Actions windows-latest runner and it now builds and runs. A couple of timing-sensitive tests (redirect, heading-nav-collapsed) fail intermittently on those runners. That is independent of this change.

`cargo test --test gui` fails on Windows for a few reasons:

* `npm` and `npx` are batch files there, so `Command::new("npm")` cannot
  find them.
* The `browser-ui-test` version was read from the second `:`-separated
  field of `npm list --parseable --long`, which is part of the path when
  it starts with a drive letter.
* `DOC_PATH` was `file://` followed by a path with backslashes, which does
  not match the `file:///C:/...` location the browser reports in
  `redirect.goml`.

Fixes rust-lang#3067
Copilot AI balanced review requested due to automatic review settings October 6, 2026 12:32
@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Oct 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: waiting on a review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GUI tests fail locally on Windows due to pathing and execution bugs

3 participants