Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put the alloc unit tests in a separate alloctests package #136642

Merged
merged 5 commits into from
Mar 8, 2025

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Feb 6, 2025

Same rationale as #135937. This PR has some extra complexity though as a decent amount of tests are testing internal implementation details rather than the public api. As such I opted to include the modules containing the types under test using #[path] into the alloctests package. This means that those modules still need #[cfg(test)], but the rest of liballoc no longer need it.

@rustbot
Copy link
Collaborator

rustbot commented Feb 6, 2025

r? @cuviper

rustbot has assigned @cuviper.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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) T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Feb 6, 2025
@rustbot
Copy link
Collaborator

rustbot commented Feb 6, 2025

These commits modify the library/Cargo.lock file. Unintentional changes to library/Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@rust-log-analyzer

This comment has been minimized.

@bjorn3 bjorn3 force-pushed the separate_alloctest_crate branch from d40470e to 34a86f7 Compare February 6, 2025 13:09
@rustbot rustbot added the A-tidy Area: The tidy tool label Feb 6, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bjorn3 bjorn3 force-pushed the separate_alloctest_crate branch from 68120bf to 8f1c7c3 Compare February 6, 2025 17:32
@bors
Copy link
Contributor

bors commented Feb 7, 2025

☔ The latest upstream changes (presumably #136697) made this pull request unmergeable. Please resolve the merge conflicts.

@bjorn3 bjorn3 force-pushed the separate_alloctest_crate branch from 8f1c7c3 to 1726670 Compare February 13, 2025 15:38
@cuviper
Copy link
Member

cuviper commented Feb 13, 2025

@bors r+

@bors
Copy link
Contributor

bors commented Feb 13, 2025

📌 Commit 1726670 has been approved by cuviper

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 Feb 13, 2025
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Feb 14, 2025
…=cuviper

Put the alloc unit tests in a separate alloctests package

Same rationale as rust-lang#135937. This PR has some extra complexity though as a decent amount of tests are testing internal implementation details rather than the public api. As such I opted to include the modules containing the types under test using `#[path]` into the alloctests package. This means that those modules still need `#[cfg(test)]`, but the rest of liballoc no longer need it.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 14, 2025
…kingjubilee

Rollup of 13 pull requests

Successful merges:

 - rust-lang#135439 (Make `-O` mean `OptLevel::Aggressive`)
 - rust-lang#136460 (Simplify `rustc_span` `analyze_source_file`)
 - rust-lang#136642 (Put the alloc unit tests in a separate alloctests package)
 - rust-lang#136904 (add `IntoBounds` trait)
 - rust-lang#136908 ([AIX] expect `EINVAL` for `pthread_mutex_destroy`)
 - rust-lang#136924 (Add profiling of bootstrap commands using Chrome events)
 - rust-lang#136951 (Use the right binder for rebinding `PolyTraitRef`)
 - rust-lang#136956 (add vendor directory to .gitignore)
 - rust-lang#136967 (Use `slice::fill` in `io::Repeat` implementation)
 - rust-lang#136976 (alloc boxed: docs: use MaybeUninit::write instead of as_mut_ptr)
 - rust-lang#136981 (ci: switch loongarch jobs to free runners)
 - rust-lang#136992 (Update backtrace)
 - rust-lang#136993 ([cg_llvm] Remove dead error message)

r? `@ghost`
`@rustbot` modify labels: rollup
@workingjubilee
Copy link
Member

Testing for #136998 (comment)
@bors r-
@bors try

@bors bors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Feb 14, 2025
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Mar 6, 2025
@cuviper
Copy link
Member

cuviper commented Mar 6, 2025

@bors r+

@bors
Copy link
Contributor

bors commented Mar 6, 2025

📌 Commit bf6ede0 has been approved by cuviper

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 Mar 6, 2025
@bors
Copy link
Contributor

bors commented Mar 7, 2025

☔ The latest upstream changes (presumably #138155) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 7, 2025
@bjorn3 bjorn3 force-pushed the separate_alloctest_crate branch from bf6ede0 to 22d0440 Compare March 7, 2025 19:11
@bjorn3
Copy link
Member Author

bjorn3 commented Mar 7, 2025

Rebased

@bors r=cuviper

@bors
Copy link
Contributor

bors commented Mar 7, 2025

📌 Commit 22d0440 has been approved by cuviper

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 7, 2025
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Mar 7, 2025
…=cuviper

Put the alloc unit tests in a separate alloctests package

Same rationale as rust-lang#135937. This PR has some extra complexity though as a decent amount of tests are testing internal implementation details rather than the public api. As such I opted to include the modules containing the types under test using `#[path]` into the alloctests package. This means that those modules still need `#[cfg(test)]`, but the rest of liballoc no longer need it.
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 7, 2025
…mpiler-errors

Rollup of 10 pull requests

Successful merges:

 - rust-lang#135651 (Support for `wasm32-wali-linux-musl` Tier-3 target)
 - rust-lang#136642 (Put the alloc unit tests in a separate alloctests package)
 - rust-lang#137337 (Add verbatim linker to AIXLinker)
 - rust-lang#137549 (Clean up various LLVM FFI things in codegen_llvm)
 - rust-lang#137957 (Remove i586-pc-windows-msvc)
 - rust-lang#138063 (Improve `-Zunpretty=hir` for parsed attrs)
 - rust-lang#138137 (setTargetTriple now accepts Triple rather than string)
 - rust-lang#138141 (tests: fix some typos in comment)
 - rust-lang#138150 (Streamline HIR intravisit `visit_id` calls for items)
 - rust-lang#138173 (Delay bug for negative auto trait rather than ICEing)

r? `@ghost`
`@rustbot` modify labels: rollup
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Mar 7, 2025
…=cuviper

Put the alloc unit tests in a separate alloctests package

Same rationale as rust-lang#135937. This PR has some extra complexity though as a decent amount of tests are testing internal implementation details rather than the public api. As such I opted to include the modules containing the types under test using `#[path]` into the alloctests package. This means that those modules still need `#[cfg(test)]`, but the rest of liballoc no longer need it.
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 7, 2025
…mpiler-errors

Rollup of 8 pull requests

Successful merges:

 - rust-lang#136642 (Put the alloc unit tests in a separate alloctests package)
 - rust-lang#137337 (Add verbatim linker to AIXLinker)
 - rust-lang#137363 (compiler: factor Windows x86-32 ABI impl into its own file)
 - rust-lang#137685 (self-contained linker: conservatively default to `-znostart-stop-gc` on x64 linux)
 - rust-lang#138000 (atomic: clarify that failing conditional RMW operations are not 'writes')
 - rust-lang#138063 (Improve `-Zunpretty=hir` for parsed attrs)
 - rust-lang#138137 (setTargetTriple now accepts Triple rather than string)
 - rust-lang#138173 (Delay bug for negative auto trait rather than ICEing)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 8, 2025
Rollup of 5 pull requests

Successful merges:

 - rust-lang#136642 (Put the alloc unit tests in a separate alloctests package)
 - rust-lang#137528 (Windows: Fix error in `fs::rename` on Windows 1607)
 - rust-lang#137685 (self-contained linker: conservatively default to `-znostart-stop-gc` on x64 linux)
 - rust-lang#137757 (On long spans, trim the middle of them to make them fit in the terminal width)
 - rust-lang#138189 (Mention `env` and `option_env` macros in `std::env::var` docs)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 720eacf into rust-lang:master Mar 8, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 8, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 8, 2025
Rollup merge of rust-lang#136642 - bjorn3:separate_alloctest_crate, r=cuviper

Put the alloc unit tests in a separate alloctests package

Same rationale as rust-lang#135937. This PR has some extra complexity though as a decent amount of tests are testing internal implementation details rather than the public api. As such I opted to include the modules containing the types under test using `#[path]` into the alloctests package. This means that those modules still need `#[cfg(test)]`, but the rest of liballoc no longer need it.
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 A-tidy Area: The tidy tool 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) T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants