-
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
compiletest: Introduce remove_and_create_dir_all()
helper
#122786
Conversation
r? @onur-ozkan rustbot has assigned @onur-ozkan. Use |
Some changes occurred in src/tools/compiletest cc @jieyouxu |
src/tools/compiletest/src/runtest.rs
Outdated
@@ -2987,8 +2987,7 @@ impl<'test> TestCx<'test> { | |||
self.safe_revision().map_or("nightly".into(), |path| path.to_owned() + "-nightly"); | |||
let compare_dir = output_base_dir(self.config, self.testpaths, Some(&suffix)); | |||
// Don't give an error if the directory didn't already exist |
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 comment can probably be removed/moved to the function
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.
Good catch. Let's remove it since it doesn't add much.
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.
feel free to r=me with or without the suggestion above
The code let _ = fs::remove_dir_all(&dir); create_dir_all(&dir).unwrap(); is duplicated in 7 places. Let's introduce a helper.
64df8d3
to
c3cc6c1
Compare
@onur-ozkan Thanks! But you'll need to |
@Enselic: 🔑 Insufficient privileges: Not in reviewers |
oops @bors r+ rollup |
… r=onur-ozkan compiletest: Introduce `remove_and_create_dir_all()` helper The code let _ = fs::remove_dir_all(&dir); create_dir_all(&dir).unwrap(); is duplicated in 7 places. Let's introduce a helper.
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#122545 (Ignore paths from expansion in `unused_qualifications`) - rust-lang#122644 (pattern analysis: add a custom test harness) - rust-lang#122696 (Add bare metal riscv32 target.) - rust-lang#122729 (Relax SeqCst ordering in standard library.) - rust-lang#122740 (use more accurate terminology) - rust-lang#122749 (make `type_flags(ReError) & HAS_ERROR`) - rust-lang#122764 (coverage: Remove incorrect assertions from counter allocation) - rust-lang#122765 (Add `usize::MAX` arg tests for Vec) - rust-lang#122776 (Rename `hir::Let` into `hir::LetExpr`) - rust-lang#122786 (compiletest: Introduce `remove_and_create_dir_all()` helper) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - rust-lang#122545 (Ignore paths from expansion in `unused_qualifications`) - rust-lang#122729 (Relax SeqCst ordering in standard library.) - rust-lang#122740 (use more accurate terminology) - rust-lang#122749 (make `type_flags(ReError) & HAS_ERROR`) - rust-lang#122764 (coverage: Remove incorrect assertions from counter allocation) - rust-lang#122765 (Add `usize::MAX` arg tests for Vec) - rust-lang#122776 (Rename `hir::Let` into `hir::LetExpr`) - rust-lang#122786 (compiletest: Introduce `remove_and_create_dir_all()` helper) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#122786 - Enselic:remove_and_create_dir_all, r=onur-ozkan compiletest: Introduce `remove_and_create_dir_all()` helper The code let _ = fs::remove_dir_all(&dir); create_dir_all(&dir).unwrap(); is duplicated in 7 places. Let's introduce a helper.
The code
is duplicated in 7 places. Let's introduce a helper.