oft: compute default test dir based on OF version
diff --git a/oft b/oft
index 8dd5952..4ca4d64 100755
--- a/oft
+++ b/oft
@@ -69,7 +69,7 @@
     # Test selection options
     "test_spec"          : "",
     "test_file"          : None,
-    "test_dir"           : os.path.join(root_dir, "tests"),
+    "test_dir"           : None,
 
     # Switch connection options
     "controller_host"    : "0.0.0.0",  # For passive bind
@@ -210,6 +210,13 @@
     # parser.allow_interspersed_args = False
     (options, args) = parser.parse_args()
 
+    # If --test-dir wasn't given, pick one based on the OpenFlow version
+    if options.test_dir == None:
+        if options.openflow_version == "1.0":
+            options.test_dir = os.path.join(root_dir, "tests")
+        else:
+            options.test_dir = os.path.join(root_dir, "tests-" + options.openflow_version)
+
     # Convert options from a Namespace to a plain dictionary
     config = config_default.copy()
     for key in config.keys():