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

[testing infra] Pretty-printing tests fail when need to find an out-of-line module #37195

Open
petrochenkov opened this issue Oct 15, 2016 · 2 comments
Labels
A-pretty Area: Pretty printing (including `-Z unpretty`) A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug.

Comments

@petrochenkov
Copy link
Contributor

Example, run-pass\mod_file_with_path_attr.rs:

#[path = "mod_file_aux.rs"] // <- can't find this file when compiling pretty-printing tests
mod m;

pub fn main() {
    assert_eq!(m::foo(), 10);
}

Test runner needs to somehow provide a source directory when compiling tests, so out-of-line modules could be successfully resolved.

@petrochenkov petrochenkov changed the title [testing infra] Pretty-printing tests fail when need to find a module by path attribute [testing infra] Pretty-printing tests fail when need to find an out-of-line module Oct 15, 2016
@petrochenkov petrochenkov added A-pretty Area: Pretty printing (including `-Z unpretty`) A-testsuite Area: The testsuite used to check the correctness of rustc labels Feb 19, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 26, 2017
@ExpHP
Copy link
Contributor

ExpHP commented Feb 24, 2018

Aside: This also affects include!, and indeed, some of the // ignore-pretty FIXMEs already tagged with this issue number are actually using include!. (No doubt though, the necessary changes to testing infrastructure are clearly similar).

@Enselic
Copy link
Member

Enselic commented Sep 28, 2023

Triage: Could you explain a bit more on how to reproduce the problem? Is there some ./x-command that fails because of this, for example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-pretty Area: Pretty printing (including `-Z unpretty`) A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

4 participants