Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --cluster option to runtest to run only cluster tests #1052

Merged
merged 2 commits into from
Sep 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/test_helper.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ source tests/support/util.tcl

set dir [pwd]
set ::all_tests []
set ::cluster_all_test []
set ::module_api_all_tests []

set test_dirs {
Expand All @@ -32,6 +33,11 @@ foreach test_dir $test_dirs {
}
}

set cluster_test_dir unit/cluster
foreach file [glob -nocomplain $dir/tests/$cluster_test_dir/*.tcl] {
lappend ::cluster_all_tests $cluster_test_dir/[file root [file tail $file]]
}

set moduleapi_test_dir unit/moduleapi
foreach file [glob -nocomplain $dir/tests/$moduleapi_test_dir/*.tcl] {
lappend ::module_api_all_tests $moduleapi_test_dir/[file root [file tail $file]]
Expand Down Expand Up @@ -557,6 +563,7 @@ proc send_data_packet {fd status data {elapsed 0}} {

proc print_help_screen {} {
puts [join {
"--cluster Run the cluster tests, by default cluster tests run along with all tests."
"--moduleapi Run the module API tests, this option should only be used in runtest-moduleapi which will build the test module."
"--valgrind Run the test over valgrind."
"--durable suppress test crashes and keep running"
Expand Down Expand Up @@ -614,6 +621,8 @@ for {set j 0} {$j < [llength $argv]} {incr j} {
}
}
incr j
} elseif {$opt eq {--cluster}} {
set ::all_tests $::cluster_all_tests
} elseif {$opt eq {--moduleapi}} {
set ::all_tests $::module_api_all_tests
} elseif {$opt eq {--config}} {
Expand Down
Loading