move testutils to src/python/oftest
testutils.py needs to be in a common location for different directories of
tests to use it.
diff --git a/tests/testutils.py b/src/python/oftest/testutils.py
similarity index 100%
rename from tests/testutils.py
rename to src/python/oftest/testutils.py
diff --git a/tests/FuncUtils.py b/tests/FuncUtils.py
index 6951293..d12c388 100644
--- a/tests/FuncUtils.py
+++ b/tests/FuncUtils.py
@@ -13,7 +13,7 @@
import logging
import types
import basic
-from testutils import *
+from oftest.testutils import *
from time import sleep
#################### Functions for various types of flow_mod ##########################################################################################
diff --git a/tests/actions.py b/tests/actions.py
index f512a02..6bcfb8c 100644
--- a/tests/actions.py
+++ b/tests/actions.py
@@ -20,7 +20,7 @@
import basic
import time
-from testutils import *
+from oftest.testutils import *
from time import sleep
from FuncUtils import *
diff --git a/tests/basic.py b/tests/basic.py
index 721f953..53947b4 100644
--- a/tests/basic.py
+++ b/tests/basic.py
@@ -31,7 +31,7 @@
import oftest.illegal_message as illegal_message
-from testutils import *
+from oftest.testutils import *
#@var basic_port_map Local copy of the configuration map from OF port
# numbers to OS interfaces
diff --git a/tests/bsn_ipmask.py b/tests/bsn_ipmask.py
index cb64cb5..489b980 100644
--- a/tests/bsn_ipmask.py
+++ b/tests/bsn_ipmask.py
@@ -9,7 +9,7 @@
import oftest.message as message
import basic
-from testutils import *
+from oftest.testutils import *
#@var port_map Local copy of the configuration map from OF port
# numbers to OS interfaces
diff --git a/tests/caps.py b/tests/caps.py
index a3355f2..93403ea 100644
--- a/tests/caps.py
+++ b/tests/caps.py
@@ -15,7 +15,7 @@
import oftest.parse as parse
import basic
-from testutils import *
+from oftest.testutils import *
#@var caps_port_map Local copy of the configuration map from OF port
# numbers to OS interfaces
diff --git a/tests/cxn.py b/tests/cxn.py
index aa2c61b..b658074 100644
--- a/tests/cxn.py
+++ b/tests/cxn.py
@@ -17,7 +17,7 @@
import oftest.dataplane as dataplane
import oftest.action as action
-from testutils import *
+from oftest.testutils import *
#@var cxn_port_map Local copy of the configuration map from OF port
# numbers to OS interfaces
diff --git a/tests/detailed_contr_sw_messages.py b/tests/detailed_contr_sw_messages.py
index 158f787..d45935d 100644
--- a/tests/detailed_contr_sw_messages.py
+++ b/tests/detailed_contr_sw_messages.py
@@ -17,7 +17,7 @@
import oftest.parse as parse
import basic
-from testutils import *
+from oftest.testutils import *
from time import sleep
from FuncUtils import *
diff --git a/tests/flow_expire.py b/tests/flow_expire.py
index ab5b68a..9be5fdd 100644
--- a/tests/flow_expire.py
+++ b/tests/flow_expire.py
@@ -17,7 +17,7 @@
import oftest.parse as parse
import basic
-from testutils import *
+from oftest.testutils import *
from time import sleep
#@var port_map Local copy of the configuration map from OF port
diff --git a/tests/flow_query.py b/tests/flow_query.py
index 63e6cb5..3017eed 100644
--- a/tests/flow_query.py
+++ b/tests/flow_query.py
@@ -74,7 +74,7 @@
import pktact
import basic
-from testutils import *
+from oftest.testutils import *
from time import sleep
#@var port_map Local copy of the configuration map from OF port
diff --git a/tests/flow_stats.py b/tests/flow_stats.py
index 9c7170e..8ff8b69 100644
--- a/tests/flow_stats.py
+++ b/tests/flow_stats.py
@@ -17,7 +17,7 @@
import oftest.parse as parse
import basic
-from testutils import *
+from oftest.testutils import *
from time import sleep
#@var fs_port_map Local copy of the configuration map from OF port
diff --git a/tests/load.py b/tests/load.py
index 7b18252..d09608e 100644
--- a/tests/load.py
+++ b/tests/load.py
@@ -31,7 +31,7 @@
import basic
import time
-from testutils import *
+from oftest.testutils import *
#@var load_port_map Local copy of the configuration map from OF port
# numbers to OS interfaces
diff --git a/tests/oft b/tests/oft
index 193b7a4..83dfb4f 100755
--- a/tests/oft
+++ b/tests/oft
@@ -122,7 +122,7 @@
# Running from source tree
sys.path.insert(0, pydir)
-import testutils
+import oftest.testutils
import oftest.ofutils
try:
@@ -553,7 +553,7 @@
_verb = 2
oftest.ofutils.default_timeout = config["default_timeout"]
-testutils.MINSIZE = config['minsize']
+oftest.testutils.MINSIZE = config['minsize']
if os.getuid() != 0 and not config["allow_user"]:
print "ERROR: Super-user privileges required. Please re-run with " \
@@ -568,14 +568,14 @@
if __name__ == "__main__":
logging.info("*** TEST RUN START: " + time.asctime())
result = unittest.TextTestRunner(verbosity=_verb).run(suite)
- if testutils.skipped_test_count > 0:
+ if oftest.testutils.skipped_test_count > 0:
ts = " tests"
- if testutils.skipped_test_count == 1: ts = " test"
- logging.info("Skipped " + str(testutils.skipped_test_count) + ts)
- print("Skipped " + str(testutils.skipped_test_count) + ts)
+ if oftest.testutils.skipped_test_count == 1: ts = " test"
+ logging.info("Skipped " + str(oftest.testutils.skipped_test_count) + ts)
+ print("Skipped " + str(oftest.testutils.skipped_test_count) + ts)
logging.info("*** TEST RUN END : " + time.asctime())
if result.failures or result.errors:
# exit(1) hangs sometimes
os._exit(1)
- if testutils.skipped_test_count > 0 and config["fail_skipped"]:
+ if oftest.testutils.skipped_test_count > 0 and config["fail_skipped"]:
os._exit(1)
diff --git a/tests/openflow_protocol_messages.py b/tests/openflow_protocol_messages.py
index 8f2593f..c8ad1b8 100644
--- a/tests/openflow_protocol_messages.py
+++ b/tests/openflow_protocol_messages.py
@@ -18,7 +18,7 @@
import oftest.parse as parse
import basic
-from testutils import *
+from oftest.testutils import *
from time import sleep
from FuncUtils import *
diff --git a/tests/pktact.py b/tests/pktact.py
index 660aa07..fd1b014 100644
--- a/tests/pktact.py
+++ b/tests/pktact.py
@@ -30,7 +30,7 @@
import basic
import time
-from testutils import *
+from oftest.testutils import *
#@var port_map Local copy of the configuration map from OF port
# numbers to OS interfaces
diff --git a/tests/port_stats.py b/tests/port_stats.py
index 0964774..96d3cc5 100644
--- a/tests/port_stats.py
+++ b/tests/port_stats.py
@@ -17,7 +17,7 @@
import oftest.parse as parse
import basic
-from testutils import *
+from oftest.testutils import *
from time import sleep
#@var fs_port_map Local copy of the configuration map from OF port
diff --git a/tests/serial_failover.py b/tests/serial_failover.py
index d12040e..311dde1 100644
--- a/tests/serial_failover.py
+++ b/tests/serial_failover.py
@@ -17,7 +17,7 @@
import oftest.dataplane as dataplane
import oftest.action as action
-from testutils import *
+from oftest.testutils import *
#@var serial_failover_port_map Local copy of the configuration map from OF port
# numbers to OS interfaces