Skip to content

Commit 937d2d3

Browse files
claudejoseph-isaacs
authored andcommitted
Fix --exclude to use substring matching for fixture names
The --exclude flag previously required exact fixture names (e.g. "clickbench_hits_1k.vortex"). Now it matches substrings, so "--exclude clickbench" correctly excludes clickbench_hits_1k.vortex. Validated full round-trip: generate -> check with all 6 synthetic fixtures passing in both exact and subset modes. Signed-off-by: Claude <noreply@anthropic.com> https: //claude.ai/code/session_012GN6N8fzLnvnCAZa7ozPQj Signed-off-by: Claude <noreply@anthropic.com>
1 parent 7c08df6 commit 937d2d3

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

vortex-test/compat-gen/src/check.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ struct FailedFixture {
4545
pub fn check(dir: &Path, mode: Mode, exclude: &[String]) -> VortexResult<()> {
4646
let fixtures: Vec<_> = all_fixtures()
4747
.into_iter()
48-
.filter(|f| !exclude.contains(&f.name().to_string()))
48+
.filter(|f| {
49+
let name = f.name();
50+
!exclude.iter().any(|pat| name.contains(pat.as_str()))
51+
})
4952
.collect();
5053

5154
if !exclude.is_empty() {

vortex-test/compat-gen/src/generate.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ struct FixtureInfo {
3636
pub fn generate(output_dir: &Path, exclude: &[String]) -> VortexResult<()> {
3737
let fixtures: Vec<_> = all_fixtures()
3838
.into_iter()
39-
.filter(|f| !exclude.contains(&f.name().to_string()))
39+
.filter(|f| {
40+
let name = f.name();
41+
!exclude.iter().any(|pat| name.contains(pat.as_str()))
42+
})
4043
.collect();
4144

4245
if !exclude.is_empty() {

vortex-test/compat-gen/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ enum Commands {
5858
#[arg(long, value_name = "DIR")]
5959
output: PathBuf,
6060

61-
/// Fixture names to exclude (comma-separated, e.g. "clickbench_hits_1k.vortex").
62-
#[arg(long, value_delimiter = ',', value_name = "NAMES")]
61+
/// Fixture name substrings to exclude (comma-separated, e.g. "clickbench,tpch").
62+
#[arg(long, value_delimiter = ',', value_name = "PATTERNS")]
6363
exclude: Vec<String>,
6464
},
6565

@@ -86,8 +86,8 @@ enum Commands {
8686
#[arg(long, default_value = "subset", value_name = "MODE")]
8787
mode: CheckMode,
8888

89-
/// Fixture names to exclude from checking (comma-separated).
90-
#[arg(long, value_delimiter = ',', value_name = "NAMES")]
89+
/// Fixture name substrings to exclude from checking (comma-separated).
90+
#[arg(long, value_delimiter = ',', value_name = "PATTERNS")]
9191
exclude: Vec<String>,
9292
},
9393
}

0 commit comments

Comments
 (0)