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

create config::tests::detect_src_and_out test for bootstrap #109055

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

onur-ozkan
Copy link
Member

Resolves one of the FIXME in bootstrap

@rustbot
Copy link
Collaborator

rustbot commented Mar 12, 2023

r? @Mark-Simulacrum

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added 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 Mar 12, 2023
@onur-ozkan
Copy link
Member Author

r? @albertlarsan68

Signed-off-by: ozkanonur <work@onurozkan.dev>
@albertlarsan68
Copy link
Member

Have you tested when the config.toml file is not in the root of the repo?
r=me if so.
@bors rollup

@onur-ozkan
Copy link
Member Author

Have you tested when the config.toml file is not in the root of the repo? r=me if so. @bors rollup

I did

@albertlarsan68
Copy link
Member

Thanks for the PR!
@bors r+

@bors
Copy link
Contributor

bors commented Mar 13, 2023

📌 Commit 58c7b67 has been approved by albertlarsan68

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 13, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 13, 2023
…bertlarsan68

create `config::tests::detect_src_and_out` test for bootstrap

Resolves one of the `FIXME` in bootstrap
@jyn514
Copy link
Member

jyn514 commented Mar 13, 2023

This doesn't test everything I would like it to. I was thinking about the following cases when I wrote the comment:

  1. Running bootstrap from the source root.
  2. Running from a subdirectory of the source root.
  3. Running from outside the source root.
  4. Running on a different machine from where bootstrap was compiled (which will be important for no python in shell scripts #107812). You can mostly replicate this by renaming the source root so it no longer exists on disk.
  5. Running with --build-dir.
  6. Running with $RUST_BOOTSTRAP_CONFIG set in the environment and build-dir set in the file.

@jyn514
Copy link
Member

jyn514 commented Mar 13, 2023

@bors r-

@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 13, 2023
@jyn514
Copy link
Member

jyn514 commented Mar 13, 2023

oh ugh it's already in a rollup :(

@bors r+

but I would prefer to add more tests, or to add the comment back.

@bors
Copy link
Contributor

bors commented Mar 13, 2023

📌 Commit 58c7b67 has been approved by jyn514

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 13, 2023
@onur-ozkan
Copy link
Member Author

This doesn't test everything I would like it to. I was thinking about the following cases when I wrote the comment:

  1. Running bootstrap from the source root.
  2. Running from a subdirectory of the source root.
  3. Running from outside the source root.
  4. Running on a different machine from where bootstrap was compiled (which will be important for no python in shell scripts #107812). You can mostly replicate this by renaming the source root so it no longer exists on disk.
  5. Running with --build-dir.
  6. Running with $RUST_BOOTSTRAP_CONFIG set in the environment and build-dir set in the file.

First 3 works, and I am pretty sure for 4th as well. I haven't check the 5 and 6.

but I would prefer to add more tests, or to add the comment back.

If I force push now, will it take the effect in rollup?

@jyn514
Copy link
Member

jyn514 commented Mar 13, 2023

No. the only way to cancel it is to close the rollup, and this isn't a regression so I don't think that makes sense.

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 14, 2023
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#108419 (Stabilize `atomic_as_ptr`)
 - rust-lang#108507 (use `as_ptr` to determine the address of atomics)
 - rust-lang#108607 (Don't use fd-lock on Solaris in bootstrap)
 - rust-lang#108830 (Treat projections with infer as placeholder during fast reject in new solver)
 - rust-lang#109055 (create `config::tests::detect_src_and_out` test for bootstrap)
 - rust-lang#109058 (Document BinOp::is_checkable)
 - rust-lang#109081 (simd-wide-sum test: adapt for LLVM 17 codegen change)
 - rust-lang#109083 (Update books)
 - rust-lang#109088 (Gracefully handle `#[target_feature]` on statics)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f33292f into rust-lang:master Mar 14, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 14, 2023
@onur-ozkan onur-ozkan deleted the detect_src_and_out branch March 14, 2023 07:43
@onur-ozkan
Copy link
Member Author

I will extend the test around this week

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Apr 6, 2023
…t_test, r=jyn514

extend `detect_src_and_out` test

> I was thinking about the following cases when I wrote the comment in rust-lang#109055
>
> 1. Running bootstrap from the source root.
> 2. Running from a subdirectory of the source root.
> 3. Running from outside the source root.
> 4. Running on a different machine from where bootstrap was compiled (which will be important > for rust-lang#107812). You can mostly replicate this by renaming the source root so it no longer exists on disk.
> 5. Running with `--build-dir`.
> 6. Running with `$RUST_BOOTSTRAP_CONFIG` set in the environment and `build-dir` set in the file.

Tested all the topics mentioned above. All worked fine. The test is now also covers if build dir is manually specified in config.

r? `@jyn514`

helps rust-lang#109120 partially
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 6, 2023
…t_test, r=jyn514

extend `detect_src_and_out` test

> I was thinking about the following cases when I wrote the comment in rust-lang#109055
>
> 1. Running bootstrap from the source root.
> 2. Running from a subdirectory of the source root.
> 3. Running from outside the source root.
> 4. Running on a different machine from where bootstrap was compiled (which will be important > for rust-lang#107812). You can mostly replicate this by renaming the source root so it no longer exists on disk.
> 5. Running with `--build-dir`.
> 6. Running with `$RUST_BOOTSTRAP_CONFIG` set in the environment and `build-dir` set in the file.

Tested all the topics mentioned above. All worked fine. The test is now also covers if build dir is manually specified in config.

r? ``@jyn514``

helps rust-lang#109120 partially
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 6, 2023
…test, r=jyn514

extend `detect_src_and_out` test

> I was thinking about the following cases when I wrote the comment in rust-lang#109055
>
> 1. Running bootstrap from the source root.
> 2. Running from a subdirectory of the source root.
> 3. Running from outside the source root.
> 4. Running on a different machine from where bootstrap was compiled (which will be important > for rust-lang#107812). You can mostly replicate this by renaming the source root so it no longer exists on disk.
> 5. Running with `--build-dir`.
> 6. Running with `$RUST_BOOTSTRAP_CONFIG` set in the environment and `build-dir` set in the file.

Tested all the topics mentioned above. All worked fine. The test is now also covers if build dir is manually specified in config.

r? `@jyn514`

helps rust-lang#109120 partially
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-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.

6 participants