Difference between revisions of "ONE/Functional Tests Guide"
Florin.coras (Talk | contribs) |
|||
(25 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
= Overview = | = Overview = | ||
+ | |||
This shows how to use VPP lite to run the LISP functional tests on an Ubuntu host using namespaces and <code>af_packet</code> interfaces. The LispFlowMapping Map-Server/Resolver in OpenDaylight Beryllium is used as overlay control plane. | This shows how to use VPP lite to run the LISP functional tests on an Ubuntu host using namespaces and <code>af_packet</code> interfaces. The LispFlowMapping Map-Server/Resolver in OpenDaylight Beryllium is used as overlay control plane. | ||
= Build VPP lite for the first time = | = Build VPP lite for the first time = | ||
+ | |||
+ | Download and install vagrant from [https://www.vagrantup.com/downloads.html here]. | ||
+ | |||
+ | Install VirtualBox, or the vagrant plugin for VMware. | ||
git clone https://gerrit.fd.io/r/vpp | git clone https://gerrit.fd.io/r/vpp | ||
Line 12: | Line 17: | ||
vagrant ssh | vagrant ssh | ||
− | To build VPP | + | To build VPP, in the VM do: |
+ | |||
+ | cd /vpp | ||
+ | export PLATFORM=vpp | ||
+ | make build | ||
+ | |||
+ | Note: For 17.01 and older versions you need to build VPP lite: | ||
cd /vpp | cd /vpp | ||
export PLATFORM=vpp_lite | export PLATFORM=vpp_lite | ||
make build | make build | ||
+ | make build-vat | ||
For more details on how to build VPP see the [[VPP/Pulling,_Building,_Running,_Hacking_and_Pushing_VPP_Code | pulling, building, running, hacking and pushing VPP code ]] section. | For more details on how to build VPP see the [[VPP/Pulling,_Building,_Running,_Hacking_and_Pushing_VPP_Code | pulling, building, running, hacking and pushing VPP code ]] section. | ||
Line 29: | Line 41: | ||
=== ODL Map-Server/Resolver === | === ODL Map-Server/Resolver === | ||
− | Steps to install and configure ODL, assuming the | + | Steps to install and configure ODL, assuming the Boron tar archive is downloaded: |
Install and configure ODL | Install and configure ODL | ||
+ | |||
<pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;"> | <pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;"> | ||
− | wget https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0. | + | wget https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.5.0-Boron/distribution-karaf-0.5.0-Boron.tar.gz |
− | tar xzf distribution-karaf-0. | + | tar xzf distribution-karaf-0.5.0-Boron.tar.gz |
</pre> | </pre> | ||
Edit custom properties and change elp policy to "replace" | Edit custom properties and change elp policy to "replace" | ||
− | ./distribution-karaf-0. | + | <pre> |
+ | ./distribution-karaf-0.5.0-Boron/etc/custom.properties | ||
+ | </pre> | ||
Run ODL | Run ODL | ||
− | ./distribution-karaf-0. | + | <pre> |
+ | ./distribution-karaf-0.5.0-Boron/bin/karaf | ||
+ | </pre> | ||
To install LispFlowMapping Map-Server/Resolver, in the karaf console type: | To install LispFlowMapping Map-Server/Resolver, in the karaf console type: | ||
Line 52: | Line 69: | ||
= Run the ONE functional tests = | = Run the ONE functional tests = | ||
− | Clone the one repo in the VM: | + | Clone the one repo in the vagrant VM: |
+ | |||
+ | cd ~ | ||
+ | git clone https://gerrit.fd.io/r/one | ||
+ | |||
+ | If running the whole test suite, execute the <code>run.sh</code> script and specify configuration method like: | ||
+ | |||
+ | sudo ./run.sh --config-method cli|vat | ||
+ | |||
+ | Alternatively, if running a single test, execute the desired script and choose one of 'cli' or 'vat' as configuration method: | ||
+ | |||
+ | sudo CFG_METHOD=cli|vat ./tests/<test_case>.sh | ||
+ | |||
+ | Supported methods are <code>vat</code> and <code>cli</code> and default is <code>vat</code>. | ||
+ | |||
+ | For step-by-step test execution you can directly pass <code>WAIT</code> parameter to the test script as follows: | ||
+ | |||
+ | sudo WAIT=1 ./tests/<test_case>.sh | ||
+ | |||
+ | = Run the ONE functional tests with VPP 16.09 = | ||
+ | |||
+ | Clone the one repo in the vagrant VM: | ||
cd ~ | cd ~ | ||
Line 61: | Line 99: | ||
cd one/tests/data_plane/vpp_lite_topo/ | cd one/tests/data_plane/vpp_lite_topo/ | ||
− | + | To run all tests do: | |
sudo ./run.sh | sudo ./run.sh | ||
− | + | To run one test do: | |
sudo ./tests/test_*.sh | sudo ./tests/test_*.sh | ||
− | + | To run a test step-by-step, edit the test file in <code>./tests/test_*.sh</code> and add to the test function call, typically the last line in the script, "wait" as a parameter. | |
+ | |||
+ | For example to run the demo showed at the ODL Summit 2016 use: | ||
+ | |||
+ | sudo WAIT=1 ./tests/test_smr_rtr_disjoint.sh |
Latest revision as of 14:30, 13 March 2017
Contents
Overview
This shows how to use VPP lite to run the LISP functional tests on an Ubuntu host using namespaces and af_packet
interfaces. The LispFlowMapping Map-Server/Resolver in OpenDaylight Beryllium is used as overlay control plane.
Build VPP lite for the first time
Download and install vagrant from here.
Install VirtualBox, or the vagrant plugin for VMware.
git clone https://gerrit.fd.io/r/vpp cd vpp/build-root/vagrant vagrant up
Wait for the VM to be provisioned and once it completes, you can access the VM with:
vagrant ssh
To build VPP, in the VM do:
cd /vpp export PLATFORM=vpp make build
Note: For 17.01 and older versions you need to build VPP lite:
cd /vpp export PLATFORM=vpp_lite make build make build-vat
For more details on how to build VPP see the pulling, building, running, hacking and pushing VPP code section.
Setup Vagrant VM
Install bridge-utils and ethtool if needed:
sudo apt-get install bridge-utils ethtool
Optional, install wireshark.
ODL Map-Server/Resolver
Steps to install and configure ODL, assuming the Boron tar archive is downloaded:
Install and configure ODL
wget https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.5.0-Boron/distribution-karaf-0.5.0-Boron.tar.gz tar xzf distribution-karaf-0.5.0-Boron.tar.gz
Edit custom properties and change elp policy to "replace"
./distribution-karaf-0.5.0-Boron/etc/custom.properties
Run ODL
./distribution-karaf-0.5.0-Boron/bin/karaf
To install LispFlowMapping Map-Server/Resolver, in the karaf console type:
feature:install odl-lispflowmapping-msmr
Run the ONE functional tests
Clone the one repo in the vagrant VM:
cd ~ git clone https://gerrit.fd.io/r/one
If running the whole test suite, execute the run.sh
script and specify configuration method like:
sudo ./run.sh --config-method cli|vat
Alternatively, if running a single test, execute the desired script and choose one of 'cli' or 'vat' as configuration method:
sudo CFG_METHOD=cli|vat ./tests/<test_case>.sh
Supported methods are vat
and cli
and default is vat
.
For step-by-step test execution you can directly pass WAIT
parameter to the test script as follows:
sudo WAIT=1 ./tests/<test_case>.sh
Run the ONE functional tests with VPP 16.09
Clone the one repo in the vagrant VM:
cd ~ git clone https://gerrit.fd.io/r/one
Go to tests folder
cd one/tests/data_plane/vpp_lite_topo/
To run all tests do:
sudo ./run.sh
To run one test do:
sudo ./tests/test_*.sh
To run a test step-by-step, edit the test file in ./tests/test_*.sh
and add to the test function call, typically the last line in the script, "wait" as a parameter.
For example to run the demo showed at the ODL Summit 2016 use:
sudo WAIT=1 ./tests/test_smr_rtr_disjoint.sh