From e77db9467bb219d601226fd13e976fefafd774f0 Mon Sep 17 00:00:00 2001 From: Brad Hall Date: Sat, 5 Nov 2011 04:44:36 -0700 Subject: [PATCH] Fix for bug 888207 Instead of splitting the tests (server/client) we just run the tests like is done in run_tests.py. Change-Id: I204e54eaca4473416b5a540719a13988b90adc30 --- .../quantum/plugins/openvswitch/run_tests.py | 22 ++++++++----------- .../openvswitch/tests/unit/test_vlan_map.py | 2 +- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/plugins/openvswitch-plugin/lib/quantum/plugins/openvswitch/run_tests.py b/plugins/openvswitch-plugin/lib/quantum/plugins/openvswitch/run_tests.py index 26b4fdc3d..03906d853 100644 --- a/plugins/openvswitch-plugin/lib/quantum/plugins/openvswitch/run_tests.py +++ b/plugins/openvswitch-plugin/lib/quantum/plugins/openvswitch/run_tests.py @@ -52,10 +52,13 @@ import unittest import sys from nose import config +from nose import core sys.path.append(os.getcwd()) +sys.path.append(os.path.dirname(__file__)) -import tools.source_environment +import tools.source_nonplugin_environment +import quantum.tests.unit from quantum.common.test_lib import run_tests, test_config from tests.unit.test_vlan_map import VlanMapTest @@ -67,23 +70,16 @@ if __name__ == '__main__': # we should only invoked the tests once invoke_once = len(sys.argv) > 1 - test_config['plugin_name'] = "quantum.plugins.openvswitch." + \ - "ovs_quantum_plugin.OVSQuantumPlugin" + test_config['plugin_name'] = "ovs_quantum_plugin.OVSQuantumPlugin" cwd = os.getcwd() - - working_dir = os.path.abspath("server/lib/quantum/tests") - c = config.Config(stream=sys.stdout, - env=os.environ, - verbosity=3, - workingDir=working_dir) - exit_status = run_tests(c) - - working_dir = os.path.abspath("%s/client/lib/quantum/tests" % cwd) c = config.Config(stream=sys.stdout, env=os.environ, verbosity=3, - workingDir=working_dir) + includeExe=True, + traverseNamespace=True, + plugins=core.DefaultPluginManager()) + c.configureWhere(quantum.tests.unit.__path__) exit_status = run_tests(c) if invoke_once: diff --git a/plugins/openvswitch-plugin/lib/quantum/plugins/openvswitch/tests/unit/test_vlan_map.py b/plugins/openvswitch-plugin/lib/quantum/plugins/openvswitch/tests/unit/test_vlan_map.py index e67f5987a..e453dc6d1 100644 --- a/plugins/openvswitch-plugin/lib/quantum/plugins/openvswitch/tests/unit/test_vlan_map.py +++ b/plugins/openvswitch-plugin/lib/quantum/plugins/openvswitch/tests/unit/test_vlan_map.py @@ -15,7 +15,7 @@ # under the License. import unittest -from quantum.plugins.openvswitch.ovs_quantum_plugin import VlanMap +from ovs_quantum_plugin import VlanMap class VlanMapTest(unittest.TestCase): -- 2.45.2