Skip to content

Conversation

lolbinarycat
Copy link
Contributor

Before, a command like ./x test tests/rustdoc-js/path-ordering.js would succeed, but run no tests, since the names of the tests are based on the .rs file. This is a bit confusing, as the rustdoc-js-std test suite only has .js files, and thus those are the files you filter on. Now, ./x test tests/rustdoc-js/path-ordering.js will be treated as an alias for ./x test tests/rustdoc-js/path-ordering.rs. This is fairly simple as each rustdoc-js test has 2 files, 1 js file and one rust file, each with an identical base filename, so all we need to do is swap the extension.

r? @Kobzol

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Sep 11, 2025
@Kobzol
Copy link
Member

Kobzol commented Sep 11, 2025

I wouldn't worry about the clone, and just always convert to Vec eagerly to simplify the code. Looks fine to me, but I'll let also @jieyouxu take a look.

@jieyouxu jieyouxu self-assigned this Sep 12, 2025
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

This feels like a bit of a hack in terms of test discovery, but is okay to make it at least usable at first.

View changes since this review

@jieyouxu
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 13, 2025

📌 Commit 472721b has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 13, 2025
bors added a commit that referenced this pull request Sep 13, 2025
Rollup of 5 pull requests

Successful merges:

 - #144498 (Add --print target-spec-json-schema)
 - #145471 (Stabilize BTree{Map,Set}::extract_if)
 - #145896 (Rehome 30 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [#3 of Batch #2])
 - #146450 (bootstrap: rustdoc-js tests can now be filtered by js files)
 - #146456 (Fix panic and incorrectly suggested examples in `format_args` macro.)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7be4189 into rust-lang:master Sep 13, 2025
10 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Sep 13, 2025
rust-timer added a commit that referenced this pull request Sep 13, 2025
Rollup merge of #146450 - lolbinarycat:bootstrap-test-js, r=jieyouxu

bootstrap: rustdoc-js tests can now be filtered by js files

Before, a command like `./x test tests/rustdoc-js/path-ordering.js` would succeed, but run no tests, since the names of the tests are based on the `.rs` file.  This is a bit confusing, as the `rustdoc-js-std` test suite only has `.js` files, and thus those are the files you filter on.  Now, `./x test tests/rustdoc-js/path-ordering.js` will be treated as an alias for `./x test tests/rustdoc-js/path-ordering.rs`.  This is fairly simple as each `rustdoc-js` test has 2 files, 1 js file and one rust file, each with an identical base filename, so all we need to do is swap the extension.

r? `@Kobzol`
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Sep 14, 2025
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#144498 (Add --print target-spec-json-schema)
 - rust-lang/rust#145471 (Stabilize BTree{Map,Set}::extract_if)
 - rust-lang/rust#145896 (Rehome 30 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [rust-lang/rust#3 of Batch rust-lang/rust#2])
 - rust-lang/rust#146450 (bootstrap: rustdoc-js tests can now be filtered by js files)
 - rust-lang/rust#146456 (Fix panic and incorrectly suggested examples in `format_args` macro.)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants