-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Pass --out-dir for run-pass tests in Compiletest #97573
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -1905,13 +1905,14 @@ impl<'test> TestCx<'test> { | |||
match output_file { | ||||
TargetLocation::ThisFile(path) => { | ||||
rustc.arg("-o").arg(path); | ||||
rustc.arg("--out-dir").arg(&self.config.build_base); | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is failing the UI test:
I think the root issue is that rust/compiler/rustc_save_analysis/src/lib.rs Line 1006 in b17e9d7
I wonder if we should be using that instead, to avoid touching anything other than save-analysis itself? Try doing that instead of adding the --out-dir path and see if it works.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jyn514
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @chenyukang the stderr is wrong. out-dir is ignored by most of the compiler when There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jyn514 Changing The test fails because of the stderr warning you got. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @czzrr please ask these questions on Zulip or the tracking issue. My github notifications are a mess and I'm very unlikely to see any comment on a closed PR. |
||||
} | ||||
TargetLocation::ThisDirectory(path) => { | ||||
if is_rustdoc { | ||||
// `rustdoc` uses `-o` for the output directory. | ||||
rustc.arg("-o").arg(path); | ||||
} else { | ||||
rustc.arg("--out-dir").arg(path); | ||||
rustc.arg("--out-dir").arg(&self.config.build_base); | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are not the same.
The difference matters when - like in this case - the test creates a subdirectory in the out-dir. If multiple tests create |
||||
} | ||||
} | ||||
} | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has the same bug as below - we should find a way to pass
path
to theThisFile
branch. It looks like usuallyThisFile(path)
is derived from the directory name:So likely we can pass
arg("--out-dir").arg(path.parent())
.