Difference between revisions of "ONE/Functional Tests Guide"

From fd.io
< ONE
Jump to: navigation, search
(Build VPP lite for the first time)
Line 77: Line 77:
 
  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
+
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.
 +
 
 +
= Changes in 16.12 =
 +
 
 +
You can now specify configuration method in tests when running whole suite
 +
 
 +
sudo ./run.sh --config-method cli|vat
 +
 
 +
or a single test (choose one of 'cli' or 'vat'):
 +
 
 +
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

Revision as of 13:51, 12 September 2016

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.

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 lite, in the VM do:

cd /vpp
export PLATFORM=vpp_lite
make build

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 SR1 tar archive is downloaded:

Install and configure ODL

wget https://nexus.opendaylight.org/content/repositories/autorelease-1415/org/opendaylight/integration/distribution-karaf/0.5.0-Boron-RC1/distribution-karaf-0.5.0-Boron-RC1.tar.gz
tar xzf distribution-karaf-0.5.0-Boron-RC1.tar.gz

Edit custom properties and change elp policy to "replace"

./distribution-karaf-0.5.0-Boron-RC1/etc/custom.properties

Run ODL

./distribution-karaf-0.5.0-Boron-RC1/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

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.

Changes in 16.12

You can now specify configuration method in tests when running whole suite

sudo ./run.sh --config-method cli|vat

or a single test (choose one of 'cli' or 'vat'):

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