From: Shweta P Date: Mon, 5 Dec 2011 12:58:58 +0000 (-0500) Subject: Modified the Readme for Unit Test Execution Instructions X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=2184460b655c66b68d498620bc522ce54ab3b118;p=openstack-build%2Fneutron-build.git Modified the Readme for Unit Test Execution Instructions Change-Id: Ib7ff79c166e34c4f99a8df55feb0191f37555597 Removed the trailing whitespaces in the README Change-Id: Ic2299bf35d9e0d8512ae4f57976884d12ba92159 --- diff --git a/quantum/plugins/cisco/README b/quantum/plugins/cisco/README index a539ab4e8..8a417e134 100755 --- a/quantum/plugins/cisco/README +++ b/quantum/plugins/cisco/README @@ -377,52 +377,54 @@ How to test the installation ---------------------------- The unit tests are located at quantum/plugins/cisco/tests/unit. They can be executed from the main folder using the run_tests.sh or to get a more detailed -result the quantum/plugins/cisco/run_tests.py script. +result the run_tests.py script. -1. Testing the core API (without UCS/Nexus/RHEL hardware, and can be run on - Ubuntu): - First disable all device-specific plugins by commenting out the entries in: - quantum/plugins/cisco/conf/plugins.ini - Then run the test script: +1. All unit tests (needs environment setup as indicated in the pre-requisites): + + ./run_tests.sh -N quantum.plugins.cisco.tests.unit + + or by modifying the environment variable to point to the plugin directory - Set the environment variable PLUGIN_DIR to the location of the plugin - directory. This is manadatory if the run_tests.sh script is used. + In bash : export PLUGIN_DIR=quantum/plugins/cisco + tcsh/csh : setenv PLUGIN_DIR quantum/plugins/cisco - In bash : export PLUGIN_DIR=quantum/plugins/cisco - tcsh/csh : setenv PLUGIN_DIR quantum/plugins/cisco - ./run_tests.sh quantum.plugins.cisco.tests.unit.test_l2networkApi + ./run_tests.sh -N + + Another option is to execute the python script run_tests.py + + python run_tests.py quantum.plugins.cisco.tests.unit + +2. Testing the core API (without UCS/Nexus/RHEL hardware, and can be run on + Ubuntu): + Device-specific plugins can be disabled by commenting out the entries in: + etc/quantum/plugins/cisco/cisco_plugins.ini + The Core API can be tested by initially disabling all device plugins, then + enabling just the UCS plugins, and finally enabling both the UCS and the + Nexus plugins. + Execute the test script as follows: + + ./run_tests.sh -N quantum.plugins.cisco.tests.unit.test_l2networkApi or - python quantum/plugins/cisco/run_tests.py - quantum.plugins.cisco.tests.unit.test_l2networkApi + python run_tests.py quantum.plugins.cisco.tests.unit.test_l2networkApi -2. Specific Plugin unit test (needs environment setup as indicated in the +3. Specific Plugin unit test (needs environment setup as indicated in the pre-requisites): - In bash : export PLUGIN_DIR=quantum/plugins/cisco - tcsh/csh : setenv PLUGIN_DIR quantum/plugins/cisco - ./run_tests.sh quantum.plugins.cisco.tests.unit. + ./run_tests.sh -N quantum.plugins.cisco.tests.unit. - or + or - python /run_tests.py - quantum.plugins.cisco.tests.unit. + python run_tests.py quantum.plugins.cisco.tests.unit. E.g.: - python quantum/plugins/cisco/run_tests.py - quantum.plugins.cisco.tests.unit.test_ucs_plugin - -3. All unit tests (needs environment setup as indicated in the pre-requisites): - - In bash : export PLUGIN_DIR=quantum/plugins/cisco - tcsh/csh : setenv PLUGIN_DIR quantum/plugins/cisco - - ./run_tests.sh quantum.plugins.cisco.tests.unit + python run_tests.py quantum.plugins.cisco.tests.unit.test_ucs_plugin - or + To run specific tests, use the following: + python run_tests.py + quantum.plugins.cisco.tests.unit.:. - python quantum/plugins/cisco/run_tests.py quantum.plugins.cisco.tests.unit 4. Testing the Extension API The script is placed alongwith the other cisco unit tests. The location may @@ -430,15 +432,12 @@ result the quantum/plugins/cisco/run_tests.py script. Location quantum/plugins/cisco/tests/unit/test_cisco_extension.py The script can be executed by : - ./run_tests.sh quantum.plugins.cisco.tests.unit.test_cisco_extension + ./run_tests.sh -N quantum.plugins.cisco.tests.unit.test_cisco_extension or python run_tests.py quantum.plugins.cisco.tests.unit.test_cisco_extension - To run specific tests - python run_tests.py - quantum.plugins.cisco.tests.unit.test_cisco_extension:. Bingo bango bongo! That's it! Thanks for taking the leap into Quantum.