Skip to content

Commit 84644eb

Browse files
arxanassunshowers
authored andcommitted
refactor bin_info -> suite_info
1 parent ab5fe61 commit 84644eb

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

nextest-runner/src/list/test_list.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -776,8 +776,8 @@ pub struct TestInstance<'a> {
776776
/// The test binary.
777777
pub binary: &'a Utf8Path,
778778

779-
/// Information about the binary.
780-
pub bin_info: &'a RustTestSuite<'a>,
779+
/// Information about the test suite.
780+
pub suite_info: &'a RustTestSuite<'a>,
781781

782782
/// Information about the test.
783783
pub test_info: &'a RustTestCaseSummary,
@@ -788,21 +788,21 @@ impl<'a> TestInstance<'a> {
788788
pub(crate) fn new(
789789
name: &'a (impl AsRef<str> + ?Sized),
790790
binary: &'a (impl AsRef<Utf8Path> + ?Sized),
791-
bin_info: &'a RustTestSuite,
791+
suite_info: &'a RustTestSuite,
792792
test_info: &'a RustTestCaseSummary,
793793
) -> Self {
794794
Self {
795795
name: name.as_ref(),
796796
binary: binary.as_ref(),
797-
bin_info,
797+
suite_info,
798798
test_info,
799799
}
800800
}
801801

802802
/// Return a reasonable key for sorting. This is (binary ID, test name).
803803
#[inline]
804804
pub(crate) fn sort_key(&self) -> (&'a str, &'a str) {
805-
(&self.bin_info.binary_id, self.name)
805+
(&self.suite_info.binary_id, self.name)
806806
}
807807

808808
/// Creates the command expression for this test instance.
@@ -811,7 +811,7 @@ impl<'a> TestInstance<'a> {
811811
test_list: &TestList<'_>,
812812
target_runner: &TargetRunner,
813813
) -> std::process::Command {
814-
let platform_runner = target_runner.for_build_platform(self.bin_info.build_platform);
814+
let platform_runner = target_runner.for_build_platform(self.suite_info.build_platform);
815815
// TODO: non-rust tests
816816

817817
let mut args = Vec::new();
@@ -833,10 +833,10 @@ impl<'a> TestInstance<'a> {
833833
make_test_command(
834834
program,
835835
args,
836-
&self.bin_info.cwd,
837-
&self.bin_info.package,
836+
&self.suite_info.cwd,
837+
&self.suite_info.package,
838838
test_list.updated_dylib_path(),
839-
&self.bin_info.non_test_binaries,
839+
&self.suite_info.non_test_binaries,
840840
)
841841
}
842842
}

nextest-runner/src/reporter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ impl<'a> TestReporterImpl<'a> {
10271027
writer,
10281028
"{:>width$} ",
10291029
instance
1030-
.bin_info
1030+
.suite_info
10311031
.binary_id
10321032
.style(self.styles.list_styles.binary_id),
10331033
width = self.binary_id_width

nextest-runner/src/reporter/aggregator.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ impl<'cfg> MetadataJunit<'cfg> {
156156

157157
let mut testcase = TestCase::new(test_instance.name, testcase_status);
158158
testcase
159-
.set_classname(&test_instance.bin_info.binary_id)
159+
.set_classname(&test_instance.suite_info.binary_id)
160160
.set_timestamp(to_datetime(main_status.start_time))
161161
.set_time(main_status.time_taken);
162162

@@ -233,8 +233,8 @@ impl<'cfg> MetadataJunit<'cfg> {
233233

234234
fn testsuite_for(&mut self, test_instance: TestInstance<'cfg>) -> &mut TestSuite {
235235
self.test_suites
236-
.entry(&test_instance.bin_info.binary_id)
237-
.or_insert_with(|| TestSuite::new(&test_instance.bin_info.binary_id))
236+
.entry(&test_instance.suite_info.binary_id)
237+
.or_insert_with(|| TestSuite::new(&test_instance.suite_info.binary_id))
238238
}
239239
}
240240

nextest-runner/src/runner.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,11 @@ impl<'a> TestRunnerInner<'a> {
310310

311311
let query = TestQuery {
312312
binary_query: BinaryQuery {
313-
package_id: test_instance.bin_info.package.id(),
314-
kind: test_instance.bin_info.kind.as_str(),
315-
binary_name: &test_instance.bin_info.binary_name,
313+
package_id: test_instance.suite_info.package.id(),
314+
kind: test_instance.suite_info.kind.as_str(),
315+
binary_name: &test_instance.suite_info.binary_name,
316316
platform: convert_build_platform(
317-
test_instance.bin_info.build_platform,
317+
test_instance.suite_info.build_platform,
318318
),
319319
},
320320
test_name: test_instance.name,

nextest-runner/tests/integration/basic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ fn test_filter_expr_with_string_filters() -> Result<()> {
286286
// * first, ignored
287287
// * then, expression
288288
// * then, for string
289-
let expected_test = get_expected_test(&test.bin_info.binary_id, test.name);
289+
let expected_test = get_expected_test(&test.suite_info.binary_id, test.name);
290290
let reason = if expected_test.status.is_ignored() {
291291
MismatchReason::Ignored
292292
} else {

nextest-runner/tests/integration/fixtures.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,8 @@ pub(crate) fn execute_collect<'a>(
374374
instance_statuses.insert(
375375
(test_instance.binary, test_instance.name),
376376
InstanceValue {
377-
binary_id: test_instance.bin_info.binary_id.as_str(),
378-
cwd: test_instance.bin_info.cwd.as_path(),
377+
binary_id: test_instance.suite_info.binary_id.as_str(),
378+
cwd: test_instance.suite_info.cwd.as_path(),
379379
status,
380380
},
381381
);

0 commit comments

Comments
 (0)