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

compiletest: the aux-crate directive can't deal with more complex paths it seems #123766

Open
fmease opened this issue Apr 11, 2024 · 0 comments
Open
Assignees
Labels
A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. P-low Low priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@fmease
Copy link
Member

fmease commented Apr 11, 2024

I've chatted with @jieyouxu and we've come to the conclusion that it's worthwhile to track compiletest issues even though we plan on fully migrating to ui_test eventually since that might still take a while.


While //@ aux-build:../helper.rs1 works as one would expect (compiletest finds ./auxiliary/../helper.rs aka ./helper.rs), //@ aux-crate:helper=../helper.rs does not. It leads to the following rustc error:

error: extern location for helper does not exist: <REDACTED>/test/ui/dummy/auxiliary/lib../helper.so
  --> <REDACTED>/tests/ui/dummy.rs:4:1
   |
LL | extern crate helper;
   | ^^^^^^^^^^^^^^^^^^^^

error: aborting due to 1 previous error

Reproducer:

tests/ui/helper.rs: empty.

tests/ui/dummy.rs:

//@ aux-crate:helper=../helper.rs
//@ check-pass
extern crate helper;
fn main() {}

Footnotes

  1. Indeed, this pattern is used inside tests/ui/!

@fmease fmease added 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. C-bug Category: This is a bug. labels Apr 11, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 11, 2024
@fmease fmease added P-low Low priority and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Apr 11, 2024
@jieyouxu jieyouxu added A-testsuite Area: The testsuite used to check the correctness of rustc and removed A-testsuite Area: The testsuite used to check the correctness of rustc labels Apr 11, 2024
@jieyouxu jieyouxu self-assigned this Apr 11, 2024
@jieyouxu jieyouxu moved this from Needs Triage / Backlog to Ready in compiletest maintenance and improvements May 29, 2024
@jieyouxu jieyouxu added the A-compiletest Area: The compiletest test runner label May 29, 2024
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-bug Category: This is a bug. P-low Low priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
Development

No branches or pull requests

3 participants