rust-lang / rust-lang/rust

`./x test <path_to_test>` does not work on msys2

Open
#128,328 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-compiletest A-contributor-roadblock C-bug E-medium E-needs-investigation T-bootstrap
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Currently, the run-make test suite on windows still can only run in msys2.

When trying to use ./x test <path_to_specific_test> inside the MSYS2 MSYS program, the usual test path/filters that works on other platforms (including outside of msys2 but in powershell or cmd) does not work within MSYS2 MSYS. This is not specific to the run-make test suite, but run-make tests are mentioned because they caused the requirement of msys2 in the first place.

For example, for a test tests/run-make/CURRENT_RUSTC_VERSION:

Examples that doesn't work

These do work outside MSYS2 MSYS on windows (for backslash path separators) and on other platforms, but not within MSYS2 MSYS:

./x test tests/run-make/CURRENT_RUSTC_VERSION
./x test tests\\run-make\\CURRENT_RUSTC_VERSION

This doesn't work in MSYS2 MSYS either

./x test tests\run-make\CURRENT_RUSTC_VERSION
Examples that do work

This incantation does work, but it is annoying to type

./x test run-make --test-args="tests/run-make/CURRENT_RUSTC_VERSION"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with ./x test tests/run-make/CURRENT_RUSTC_VERSION in the MSYS2 MSYS program, then compare it with the working run-make --test-args form. Trace how ./x test <path> handles test paths and MSYS2 path separators. Done means a specific test path works directly in MSYS2 without the workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.