Skip to content

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

Open
@fmease

Description

@fmease

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/!

Metadata

Metadata

Assignees

Labels

A-compiletestArea: The compiletest test runnerA-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.P-lowLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions