]> git.puffer.fish Git - matthieu/frr.git/commitdiff
Update Documentation
authorMartin Winter <mwinter@netdef.org>
Sat, 26 Nov 2016 04:11:02 +0000 (20:11 -0800)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 28 Nov 2018 01:22:11 +0000 (20:22 -0500)
tests/topotests/README.md

index f9c90792665516d01f6b14b941e9c0f28c142d0d..0e34091cc7666cf2a8ff505d11623c8567909691 100644 (file)
@@ -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.
-