aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorMartin Balaz <martin.balaz@pantheon.tech>2020-07-24 12:08:07 +0200
committerPeter Mikus <pmikus@cisco.com>2020-07-28 08:37:58 +0000
commit537e389b1ae4a3a7a329880bbe89d240d8f956fc (patch)
tree5dab8b40f6cdd4e07a165373d05587a3822c76a1 /docs
parent1b1bd557d45ea4fb8345f67e5211829493120ac4 (diff)
Docs testing_in_vagrant: add header sections and make command line codes more readable
Signed-off-by: Martin Balaz <martin.balaz@pantheon.tech> Change-Id: I0b8fdaad1e68e41e4a436d9f2fc566d8896adbd6 Signed-off-by: Martin Balaz <martin.balaz@pantheon.tech>
Diffstat (limited to 'docs')
-rw-r--r--docs/testing_in_vagrant.rst91
1 files changed, 65 insertions, 26 deletions
diff --git a/docs/testing_in_vagrant.rst b/docs/testing_in_vagrant.rst
index 3612ba1e66..d3a0041539 100644
--- a/docs/testing_in_vagrant.rst
+++ b/docs/testing_in_vagrant.rst
@@ -1,49 +1,88 @@
Running CSIT locally in Vagrant
-------------------------------
+Install prerequisites
+=====================
+
+Run all commands from command line.
+
1. Download and install latest virtualbox from `official page
- <https://www.virtualbox.org/wiki/Downloads>`_
+ <https://www.virtualbox.org/wiki/Downloads>`_.
To verify the installation, run VBoxManage:
- - on windows:
- "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" --version
- - on nix: VBoxManage --version
- You should see virtualbox manager version printed, eg: 6.0.0r127566
+
+ - on windows::
+
+ "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" --version
+
+ - on nix::
+
+ VBoxManage --version
+
+ You should see virtualbox manager version printed, eg: 6.1.12r139181
2. Download and install latest vagrant `from official page
- <https://www.vagrantup.com/downloads.html>`_
- To verify the installtion, run:
+ <https://www.vagrantup.com/downloads.html>`_.
+ To verify the installtion, run::
+
vagrant -v
- You should see vagrant version printed, eg: Vagrant 2.2.2
-3. Install vagrant plugins
- From command line run:
+ You should see vagrant version printed, eg: Vagrant 2.2.9
+
+3. Install vagrant plugins::
+
vagrant plugin install vagrant-vbguest
vagrant plugin install vagrant-cachier
If you are behind a proxy, install proxyconf plugin and update proxy
- settings in Vagrantfile:
+ settings in Vagrantfile::
+
vagrant plugin install vagrant-proxyconf
-4. Start the provisioning:
- vagrant up --provider virtualbox
+Set up and run Vagrant virtualbox
+======================================
+
+Before running following commands change working directory to Vagrant specific directory
+(from within root CSIT directory) ::
+
+ cd resources/libraries/tools/vagrant
+
+This allows Vagrant to automatically find Vagrantfile and corresponding Vagrant environment.
+
+Start the provisioning::
+
+ vagrant up --provider virtualbox
Your new VPP Device virtualbox machine will be created and configured.
Master branch of csit project will be cloned inside virtual machine into
- /home/vagrant/csit folder.
-Once the process is finished, you can login to the box using:
- vagrant ssh
-From within the box run the tests using:
- cd /home/vagrant/csit/resources/libraries/bash/entry
- ./bootstrap_vpp_device.sh csit-vpp-device-master-ubuntu1804-1n-vbox
+ /home/vagrant/csit folder.
+
+Once the process is finished, you can login to the box using::
+
+ vagrant ssh
In case you need to completely rebuild the box and start from scratch,
-run these commands:
- vagrant destroy -f
- vagrant up --provider virtualbox
+run these commands::
+
+ vagrant destroy -f
+ vagrant up --provider virtualbox
+
+
+Run tests
+==============================
+
+From within the box run the tests using::
+
+ cd /home/vagrant/csit/resources/libraries/bash/entry
+ ./bootstrap_vpp_device.sh csit-vpp-device-master-ubuntu1804-1n-vbox
To run only selected tests based on TAGS, export environment variables before
-running the test suite:
- export GERRIT_EVENT_TYPE="comment-added"
- export GERRIT_EVENT_COMMENT_TEXT="devicetest memif"
- ./bootstrap_vpp_device.sh csit-vpp-device-master-ubuntu1804-1n-vbox \ No newline at end of file
+running the test suite::
+
+ export GERRIT_EVENT_TYPE="comment-added"
+ export GERRIT_EVENT_COMMENT_TEXT="devicetest memif"
+
+ # now it will run tests, selected based on tags
+ ./bootstrap_vpp_device.sh csit-vpp-device-master-ubuntu1804-1n-vbox
+
+