Skip to content

Commit 0d7ab83

Browse files
authored
DEVPROD-16742 Include fully disabled feature flags when using resmoke's test-discovery (#92)
1 parent 122eb95 commit 0d7ab83

File tree

6 files changed

+26
-3
lines changed

6 files changed

+26
-3
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Changelog
2+
## 0.7.24 - 2025-04-10
3+
* Include fully disabled feature flags when using resmoke's test-discovery
4+
25
## 0.7.23 - 2025-03-17
36
* Add a timeout to Evergreen test stats requests
47

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "mongo-task-generator"
33
description = "Dynamically split evergreen tasks into subtasks for testing the 10gen/mongo project."
44
license = "Apache-2.0"
5-
version = "0.7.23"
5+
version = "0.7.24"
66
repository = "https://github.com/mongodb/mongo-task-generator"
77
authors = ["DevProd Correctness Team <devprod-correctness-team@mongodb.com>"]
88
edition = "2018"

src/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ pub struct ExecutionConfiguration<'a> {
139139
pub gen_burn_in: bool,
140140
/// True if the generator should skip tests covered by more complex suites.
141141
pub skip_covered_tests: bool,
142+
/// True if test discovery should include tests that are tagged with fully disabled features.
143+
pub include_fully_disabled_feature_tests: bool,
142144
/// Command to execute burn_in_tests.
143145
pub burn_in_tests_command: &'a str,
144146
/// S3 endpoint to get test stats from.
@@ -169,6 +171,7 @@ impl Dependencies {
169171
let discovery_service = Arc::new(ResmokeProxy::new(
170172
execution_config.resmoke_command,
171173
execution_config.skip_covered_tests,
174+
execution_config.include_fully_disabled_feature_tests,
172175
));
173176
let multiversion_service = Arc::new(MultiversionServiceImpl::new(
174177
discovery_service.get_multiversion_config()?,

src/main.rs

+5
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ struct Args {
110110
#[clap(long, default_value = DEFAULT_RESMOKE_COMMAND)]
111111
resmoke_command: String,
112112

113+
/// If the generator should include tests that are tagged with fully disabled features.
114+
#[clap(long)]
115+
include_fully_disabled_feature_tests: bool,
116+
113117
/// File containing configuration for generating sub-tasks.
114118
#[clap(long, value_parser)]
115119
generate_sub_tasks_config: Option<PathBuf>,
@@ -158,6 +162,7 @@ async fn main() {
158162
config_location: &evg_expansions.config_location(),
159163
gen_burn_in: args.burn_in,
160164
skip_covered_tests: evg_expansions.is_patch && !evg_expansions.run_covered_tests,
165+
include_fully_disabled_feature_tests: args.include_fully_disabled_feature_tests,
161166
burn_in_tests_command: &args.burn_in_tests_command,
162167
s3_test_stats_endpoint: &args.s3_test_stats_endpoint,
163168
};

src/resmoke/resmoke_proxy.rs

+13-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ pub struct ResmokeProxy {
4343
resmoke_script: Vec<String>,
4444
/// True if the generator should skip tests already run in more complex suites.
4545
skip_covered_tests: bool,
46+
/// True if test discovery should include tests that are tagged with fully disabled features.
47+
include_fully_disabled_feature_tests: bool,
4648
}
4749

4850
impl ResmokeProxy {
@@ -52,14 +54,20 @@ impl ResmokeProxy {
5254
///
5355
/// * `resmoke_cmd` - Command to invoke resmoke.
5456
/// * `skip_covered_tests` - Whether the generator should skip tests run in more complex suites.
55-
pub fn new(resmoke_cmd: &str, skip_covered_tests: bool) -> Self {
57+
/// * `include_fully_disabled_feature_tests` - If the generator should include tests that are tagged with fully disabled features.
58+
pub fn new(
59+
resmoke_cmd: &str,
60+
skip_covered_tests: bool,
61+
include_fully_disabled_feature_tests: bool,
62+
) -> Self {
5663
let cmd_parts: Vec<_> = resmoke_cmd.split(' ').collect();
5764
let cmd = cmd_parts[0];
5865
let script = cmd_parts[1..].iter().map(|s| s.to_string()).collect();
5966
Self {
6067
resmoke_cmd: cmd.to_string(),
6168
resmoke_script: script,
6269
skip_covered_tests,
70+
include_fully_disabled_feature_tests,
6371
}
6472
}
6573
}
@@ -97,6 +105,10 @@ impl TestDiscovery for ResmokeProxy {
97105
cmd.append(&mut vec!["--skipTestsCoveredByMoreComplexSuites"]);
98106
}
99107

108+
if self.include_fully_disabled_feature_tests {
109+
cmd.append(&mut vec!["--includeFullyDisabledFeatureTests"]);
110+
}
111+
100112
let start = Instant::now();
101113
let cmd_output = run_command(&cmd).unwrap();
102114

0 commit comments

Comments
 (0)