Skip to content

Commit 2afb681

Browse files
authored
Fix sqllogictests test running compatibility (ignore --test-threads) (apache#16694)
* Fix test running compatibility sqllogictests.rs already has various parts of it's Options struct that provide compatibility with the standard test running options. Extend this to include the standard `--test-threads` option, so that running for example `cargo test -- --test-threads 1` in the project root will succeed. Previously it complained about the unknown option. This can be useful on a machine with a large number of cores which causes many tests to build & run in parallel, which in my case caused a crash due to exhausing the system RAM. * Make test-threads optional Make test-threads optional, so that the tests also pass when this is not passed in. 🤦
1 parent 8596812 commit 2afb681

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

datafusion/sqllogictest/bin/sqllogictests.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,12 @@ struct Options {
689689
help = "IGNORED (for compatibility with built-in rust test runner)"
690690
)]
691691
nocapture: bool,
692+
693+
#[clap(
694+
long,
695+
help = "IGNORED (for compatibility with built-in rust test runner)"
696+
)]
697+
test_threads: Option<usize>,
692698
}
693699

694700
impl Options {

0 commit comments

Comments
 (0)