Hi folks,
I wanted to make it easier to run unit tests with plugins other than the
FakePlugin currently used with the unit tests.  Hopefully this will be
useful to others writing plugins as well.

A proposed branch is available here, feedback welcomed:
https://code.launchpad.net/~danwent/quantum/test-refactor

With this branch, you can still run the standard tests using:
./run_tests.sh

But you can also set PLUGIN_DIR in the environment and it will instead find
a run_tests.py file in the plugin directory and invoke it:

PLUGIN_DIR=quantum/plugins/openvswitch/ ./run_tests.sh

The run_tests.py in the plugin directory can invoke both the standard unit
tests using the specified plugin, and it can also run additional tests (see
quantum/plugins/openvswitch/run_tests.py as an example).

Feel free to make suggestions about the design. My main goals were just to
easily enable running tests with different plugins while minimizing code
duplication.

Dan

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Wendlandt
Nicira Networks, Inc.
www.nicira.com | www.openvswitch.org
Sr. Product Manager
cell: 650-906-2650
~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- 
Mailing list: https://launchpad.net/~netstack
Post to     : netstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~netstack
More help   : https://help.launchpad.net/ListHelp

Reply via email to