summaryrefslogtreecommitdiffstats
path: root/tests/topotests/README.md
diff options
context:
space:
mode:
authorMartin Winter <mwinter@netdef.org>2016-11-26 05:11:02 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-11-28 02:22:11 +0100
commit6b1be61ad89d3e87ef53f875dadbabdf022b447d (patch)
tree9d67110cca95c6a8b13d4f248fb578d83f1aef4f /tests/topotests/README.md
parentbgp_multiview_topo1: Skip remaining on fatal error and try to get more crash ... (diff)
downloadfrr-6b1be61ad89d3e87ef53f875dadbabdf022b447d.tar.xz
frr-6b1be61ad89d3e87ef53f875dadbabdf022b447d.zip
Update Documentation
Diffstat (limited to 'tests/topotests/README.md')
-rw-r--r--tests/topotests/README.md47
1 files changed, 42 insertions, 5 deletions
diff --git a/tests/topotests/README.md b/tests/topotests/README.md
index f9c907926..0e34091cc 100644
--- a/tests/topotests/README.md
+++ b/tests/topotests/README.md
@@ -12,8 +12,29 @@ tests)
2. apt-get install python-pip
3. apt-get install iproute
4. pip install ipaddr
-5. pip install exabgp
-6. useradd -d /var/run/exabgp/ -s /bin/false exabgp
+5. pip install pytest
+6. pip install exabgp
+7. useradd -d /var/run/exabgp/ -s /bin/false exabgp
+
+### Enable Coredumps
+Optional, will give better output
+
+1. apt-get install gdb
+2. disable apport (which move core files)
+
+ Set `enabled=0` in `/etc/default/apport`
+
+3. Update security limits
+
+ Add/change `/etc/security/limits.conf` to
+
+ #<domain> <type> <item> <value>
+ * soft core unlimited
+ root soft core unlimited
+ * hard core unlimited
+ root hard core unlimited
+
+4. reboot (for options to take effect)
### Quagga Installation
Quagga needs to be installed separatly. It is assume to be configured
@@ -23,14 +44,31 @@ like the standard Ubuntu Packages:
- Running under user quagga, group quagga
- vtygroup: quaggavty
- config directory: /etc/quagga
+- For Quagga Packages, install the dbg package as well for coredump decoding
No Quagga config needs to be done and no Quagga daemons should be run ahead
of the test. They are all started as part of the test
## Executing Tests
-Go to test directory and execute python script.
-Test will run all on it's own and return non-zero exit code if it fails.
+#### Execute all tests with output to console
+
+ py.test -s -v --tb=no
+
+All test_* scripts in subdirectories are detected and executed (unless disabled in
+`pytest.ini` file)
+
+`--tb=no` disables the python traceback which might be irrelevant unless the
+test script itself is debugged
+
+#### Execute single test
+
+ cd test_to_be_run
+ ./test_to_be_run.py
+
+For further options, refer to pytest documentation
+
+Test will set exit code which can be used with `git bisect`
For the simulated topology, see the description in the python file
@@ -41,4 +79,3 @@ shutdown), then use the `mn -c` command to clean up the environment
All the configs and scripts are licensed under a ISC-style license. See
Python scripts for details.
-