]> git.saurik.com Git - redis.git/blobdiff - tests/test_helper.tcl
fix behavior for out-of-range negative end index on ZREMRANGEBYRANK
[redis.git] / tests / test_helper.tcl
index 8413a8b28c1e0c9199083217bc4adb0ae1db459c..da6520a361dcf34837453606e356b68a0a840cd9 100644 (file)
@@ -15,6 +15,7 @@ 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"
@@ -58,7 +59,6 @@ proc cleanup {} {
 
 proc main {} {
     cleanup
-    if 0 {
     execute_tests "unit/auth"
     execute_tests "unit/protocol"
     execute_tests "unit/basic"
@@ -67,7 +67,6 @@ proc main {} {
     execute_tests "unit/type/zset"
     execute_tests "unit/type/hash"
     execute_tests "unit/sort"
-    }
     execute_tests "unit/expire"
     execute_tests "unit/other"
     execute_tests "unit/cas"
@@ -75,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"
@@ -108,6 +107,13 @@ for {set j 0} {$j < [llength $argv]} {incr j} {
             }
         }
         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