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

run-make: do not use relative links to refer to compiler/stdlib sources, we should introduce some CHECKOUT_ROOT env var/helper. #126071

Closed
jieyouxu opened this issue Jun 6, 2024 · 3 comments · Fixed by #126081
Assignees
Labels
A-compiletest Area: the compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jieyouxu
Copy link
Member

jieyouxu commented Jun 6, 2024

Some run-make tests refer to stdlib sources with "../../../library/alloc/src/lib.rs" which seems not ideal. @Kobzol suggested that we should introduce a CHECKOUT_ROOT helper to make this less fragile.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 6, 2024
@jieyouxu jieyouxu self-assigned this Jun 6, 2024
@jieyouxu jieyouxu added C-cleanup Category: PRs that clean code up or issues documenting cleanup. A-testsuite Area: The testsuite used to check the correctness of rustc T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jun 6, 2024
@jieyouxu jieyouxu changed the title Do not use relative links to refer to compiler/stdlib sources, we should introduce some CHECKOUT_ROOT env var/helper. run-make: do not use relative links to refer to compiler/stdlib sources, we should introduce some CHECKOUT_ROOT env var/helper. Jun 6, 2024
@bjorn3
Copy link
Member

bjorn3 commented Jun 6, 2024

There is already the S env var set by compiletest for the source root.

@jieyouxu jieyouxu added the A-compiletest Area: the compiletest test runner label Jun 6, 2024
@jieyouxu
Copy link
Member Author

jieyouxu commented Jun 6, 2024

There is already the S env var set by compiletest for the source root.

I'm actually dumb, we even already have source_path in the support library:

pub fn source_path() -> PathBuf {
env_var("S").into()
}

@ChrisDenton
Copy link
Member

That's a very descriptive environment variable name, lol

@bors bors closed this as completed in af229f5 Jun 7, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jun 7, 2024
Rollup merge of rust-lang#126081 - Kobzol:run-make-relative-paths, r=jieyouxu

Do not use relative paths to Rust source root in run-make tests

Pre-requisite for rust-lang#126080.

Fixes: rust-lang#126071

r? `@jieyouxu`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jun 7, 2024
…ouxu

Clean up source root in run-make tests

The name `S` isn't exactly the most descriptive, and we also shouldn't need to pass it when building (actually I think that most of the env. vars that we pass to `cargo` here are probably not really needed).

Related issue: rust-lang#126071

r? `@jieyouxu`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jun 7, 2024
…ouxu

Clean up source root in run-make tests

The name `S` isn't exactly the most descriptive, and we also shouldn't need to pass it when building (actually I think that most of the env. vars that we pass to `cargo` here are probably not really needed).

Related issue: rust-lang#126071

r? ``@jieyouxu``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jun 7, 2024
…ouxu

Clean up source root in run-make tests

The name `S` isn't exactly the most descriptive, and we also shouldn't need to pass it when building (actually I think that most of the env. vars that we pass to `cargo` here are probably not really needed).

Related issue: rust-lang#126071

r? ```@jieyouxu```
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jun 7, 2024
Rollup merge of rust-lang#126112 - Kobzol:runmake-source-root, r=jieyouxu

Clean up source root in run-make tests

The name `S` isn't exactly the most descriptive, and we also shouldn't need to pass it when building (actually I think that most of the env. vars that we pass to `cargo` here are probably not really needed).

Related issue: rust-lang#126071

r? ```@jieyouxu```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: the compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants