]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests/topotests: Update documentation
authorChristian Franke <chris@opensourcerouting.org>
Sat, 1 Dec 2018 15:33:34 +0000 (16:33 +0100)
committerChristian Franke <chris@opensourcerouting.org>
Sat, 1 Dec 2018 15:33:34 +0000 (16:33 +0100)
The documentation needs an update to match the integrated version.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
tests/topotests/README.md
tests/topotests/docker/README.md

index 3f1323c21817b1634ccef92888844fe424ddc749..a495675ee9291cf3b5891bbc51fba6e4904055c8 100644 (file)
@@ -1,5 +1,10 @@
 # FRRouting Topology Tests with Mininet
 
+## Running tests with docker
+
+There is a docker image which allows to run topotests. Instructions can be
+found [here](docker/README.md).
+
 ## Guidelines
 
 Instructions for  use, write or debug topologies can be found in the
@@ -11,11 +16,6 @@ that does what you need. If nothing is similar, then you may create a
 new topology, preferably, using the newest
 [template](example-test/test_template.py).
 
-## Running tests with docker
-
-There is a docker image which allows to run topotests. Instructions can be
-found [here](docker/README.md).
-
 ## Installation of Mininet for running tests
 Only tested with Ubuntu 16.04 and Ubuntu 18.04 (which uses Mininet 2.2.x)
 
index 918594e6a3324a4dd57ff377cb3d6b1be4ddf1eb..cdc41fad5250d0c5df929d162446b96717140ff3 100644 (file)
@@ -3,34 +3,43 @@
 ## Quickstart
 
 If you have Docker installed, you can run the topotests in Docker.
-The easiest way to do this, is to use the `frr-topotests.sh` script
-from this repository:
+The easiest way to do this, is to use the make targets from this
+repository.
+
+Your current user needs to have access to the Docker daemon. Alternatively
+you can run these commands as root.
 
 ```console
-wget -O /usr/local/bin/frr-topotests \
-    https://raw.githubusercontent.com/frrouting/topotests/master/docker/frr-topotests.sh
-chmod +x /usr/local/bin/frr-topotests
+make topotests-build
+make topotests
 ```
 
-Once this script is in place, simply run it while you are inside your FRR repository:
+The first command will build a docker image with all the dependencies needed
+to run the topotests.
 
-```console
-frr-topotests
-```
+The second command will spawn an instance of this image, compile FRR inside
+of it, and run the topotests.
 
 ## Advanced Usage
 
-There are several environtment variables which can be used to modify the behavior of
-the image. Those can be listed using `frr-topotests -h`.
+Internally, the topotests make target uses a shell script to spawn the docker
+container.
+
+There are several environment variables which can be used to modify the behavior
+of the script, these can be listed by calling it with `-h`:
+
+```console
+./tests/topotests/docker/frr-topotests.sh -h
+```
 
 For example, a volume is used to cache build artifacts between multiple runs
 of the image. If you need to force a complete recompile, you can set `TOPOTEST_CLEAN`:
 
 ```console
-TOPOTEST_CLEAN=1 frr-topotests
+TOPOTEST_CLEAN=1 ./tests/topotests/docker/frr-topotests.sh
 ```
 
-By default, `frr-topotests` will build frr and run pytest. If you append
+By default, `frr-topotests.sh` will build frr and run pytest. If you append
 arguments and the first one starts with `/` or `./`, they will replace the call to
 pytest. If the appended arguments do not match this patttern, they will be provided to
 pytest as arguments.
@@ -38,11 +47,11 @@ pytest as arguments.
 So, to run a specific test with more verbose logging:
 
 ```console
-frr-topotests -vv -s all-protocol-startup/test_all_protocol_startup.py
+./tests/topotests/docker/frr-topotests.sh -vv -s all-protocol-startup/test_all_protocol_startup.py
 ```
 
 And to compile FRR but drop into a shell instead of running pytest:
 
 ```console
-frr-topotests /bin/bash
+./tests/topotests/docker/frr-topotests.sh /bin/bash
 ```