X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/38273a9ed6a92f5a9c0c6250484fff677b972019..4774a53b:/tests/test_helper.tcl diff --git a/tests/test_helper.tcl b/tests/test_helper.tcl index 69d9bbf9..da6520a3 100644 --- a/tests/test_helper.tcl +++ b/tests/test_helper.tcl @@ -13,6 +13,9 @@ set ::host 127.0.0.1 set ::port 16379 set ::traceleaks 0 set ::valgrind 0 +set ::denytags {} +set ::allowtags {} +set ::external 0; # If "1" this means, we are running against external instance proc execute_tests name { source "tests/$name.tcl" @@ -71,7 +74,7 @@ proc main {} { execute_tests "integration/aof" # run tests with VM enabled - set ::global_overrides [list [list vm-enabled yes]] + set ::global_overrides {vm-enabled yes} execute_tests "unit/protocol" execute_tests "unit/basic" execute_tests "unit/type/list" @@ -91,6 +94,32 @@ proc main {} { cleanup } +# parse arguments +for {set j 0} {$j < [llength $argv]} {incr j} { + set opt [lindex $argv $j] + set arg [lindex $argv [expr $j+1]] + if {$opt eq {--tags}} { + foreach tag $arg { + if {[string index $tag 0] eq "-"} { + lappend ::denytags [string range $tag 1 end] + } else { + lappend ::allowtags $tag + } + } + incr j + } elseif {$opt eq {--host}} { + set ::external 1 + set ::host $arg + incr j + } elseif {$opt eq {--port}} { + set ::port $arg + incr j + } else { + puts "Wrong argument: $opt" + exit 1 + } +} + if {[catch { main } err]} { if {[string length $err] > 0} { # only display error when not generated by the test suite