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

Fix sgx unit test compilation #121513

Merged
merged 1 commit into from
Feb 25, 2024
Merged

Fix sgx unit test compilation #121513

merged 1 commit into from
Feb 25, 2024

Conversation

nshyrei
Copy link
Contributor

@nshyrei nshyrei commented Feb 23, 2024

Fixes a compilation error:

error[E0583]: file not found for module `tests`
 --> library/std/src/sys/locks/rwlock/sgx.rs:2:1
  |
2 | mod tests;
  | ^^^^^^^^^^
  |
  = help: to create the module `tests`, create file "library/std/src/sys/locks/rwlock/sgx/tests.rs" or "library/std/src/sys/locks/rwlock/sgx/tests/mod.rs"
  = note: if there is a `mod tests` elsewhere in the crate already, import it with `use crate::...` instead

For more information about this error, try `rustc --explain E0583`.
error: could not compile `std` (lib test) due to 1 previous error`

When running command:

 `TF_BUILD=True RUST_TEST_THREADS=1 ./x.py test --stage 1 "library/std" tests/assembly tests/run-make --target=x86_64-fortanix-unknown-sgx --no-doc --exclude src/tools/linkchecker --exclude src/tools/rust-demangler --no-fail-fast 2>&1

The fix is done by moving a file to the location suggested by the compiler.

The issue was introduced by PR: #121177

@rustbot
Copy link
Collaborator

rustbot commented Feb 23, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cuviper (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Feb 23, 2024
@cuviper
Copy link
Member

cuviper commented Feb 25, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 25, 2024

📌 Commit e656844 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 25, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 25, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#119590 (Stabilize `cfg_target_abi`)
 - rust-lang#120805 (make non-PartialEq-typed consts as patterns a hard error)
 - rust-lang#121060 (Add newtypes for bool fields/params/return types)
 - rust-lang#121284 (Add test cases for inlining compiler-private items)
 - rust-lang#121324 (pattern_analysis: factor out unspecialization)
 - rust-lang#121409 (Prevent cycle in implied predicates computation)
 - rust-lang#121513 (Fix sgx unit test compilation)
 - rust-lang#121570 (Make most bootstrap step types !Copy)
 - rust-lang#121586 (Don't use `unwrap()` in `ArrayIntoIter` lint when typeck fails)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f548636 into rust-lang:master Feb 25, 2024
11 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Feb 25, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 25, 2024
Rollup merge of rust-lang#121513 - nshyrei:fix_tests_module, r=cuviper

Fix sgx unit test compilation

Fixes a compilation error:
```
error[E0583]: file not found for module `tests`
 --> library/std/src/sys/locks/rwlock/sgx.rs:2:1
  |
2 | mod tests;
  | ^^^^^^^^^^
  |
  = help: to create the module `tests`, create file "library/std/src/sys/locks/rwlock/sgx/tests.rs" or "library/std/src/sys/locks/rwlock/sgx/tests/mod.rs"
  = note: if there is a `mod tests` elsewhere in the crate already, import it with `use crate::...` instead

For more information about this error, try `rustc --explain E0583`.
error: could not compile `std` (lib test) due to 1 previous error`
```
When running command:
```
 `TF_BUILD=True RUST_TEST_THREADS=1 ./x.py test --stage 1 "library/std" tests/assembly tests/run-make --target=x86_64-fortanix-unknown-sgx --no-doc --exclude src/tools/linkchecker --exclude src/tools/rust-demangler --no-fail-fast 2>&1
```
The fix is done by moving a file to the location suggested by the compiler.

The issue was introduced by PR: rust-lang#121177
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

4 participants