Skip to content

Commit c80cade

Browse files
committed
Move module compute_diff into compiletest::runtest
The code in this module is always called in the context of running an individual tests, and sometimes prints output that needs to be captured. Moving this module into `runtest` will make it easier to find and audit all of the print statements that need to be updated when overhauling output-capture.
1 parent 269db62 commit c80cade

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/tools/compiletest/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
mod tests;
1010

1111
pub mod common;
12-
pub mod compute_diff;
1312
mod debuggers;
1413
pub mod diagnostics;
1514
pub mod directives;

src/tools/compiletest/src/runtest.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,13 @@ use crate::common::{
2121
UI_WINDOWS_SVG, expected_output_path, incremental_dir, output_base_dir, output_base_name,
2222
output_testname_unique,
2323
};
24-
use crate::compute_diff::{DiffLine, make_diff, write_diff, write_filtered_diff};
2524
use crate::directives::TestProps;
2625
use crate::errors::{Error, ErrorKind, load_errors};
2726
use crate::read2::{Truncated, read2_abbreviated};
27+
use crate::runtest::compute_diff::{DiffLine, make_diff, write_diff, write_filtered_diff};
2828
use crate::util::{Utf8PathBufExt, add_dylib_path, static_regex};
2929
use crate::{ColorConfig, help, json, stamp_file_path, warning};
3030

31-
mod debugger;
32-
3331
// Helper modules that implement test running logic for each test suite.
3432
// tidy-alphabetical-start
3533
mod assembly;
@@ -48,6 +46,8 @@ mod rustdoc_json;
4846
mod ui;
4947
// tidy-alphabetical-end
5048

49+
mod compute_diff;
50+
mod debugger;
5151
#[cfg(test)]
5252
mod tests;
5353

File renamed without changes.

src/tools/compiletest/src/runtest/mir_opt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use miropt_test_tools::{MiroptTest, MiroptTestFile, files_for_miropt_test};
66
use tracing::debug;
77

88
use super::{Emit, TestCx, WillExecute};
9-
use crate::compute_diff::write_diff;
9+
use crate::runtest::compute_diff::write_diff;
1010

1111
impl TestCx<'_> {
1212
pub(super) fn run_mir_opt_test(&self) {

0 commit comments

Comments
 (0)