diff options
Diffstat (limited to 'docker/ubuntu22-ci')
-rw-r--r-- | docker/ubuntu22-ci/README.md | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/docker/ubuntu22-ci/README.md b/docker/ubuntu22-ci/README.md index 73f4a10..617192e 100644 --- a/docker/ubuntu22-ci/README.md +++ b/docker/ubuntu22-ci/README.md @@ -8,10 +8,18 @@ This builds an ubuntu 22.04 container for dev / test docker build -t frr-ubuntu22:latest -f docker/ubuntu-ci/Dockerfile . ``` -# Running Full Topotest +# Run ``` -docker run --init -it --privileged --name frr-ubuntu22 -v /lib/modules:/lib/modules frr-ubuntu22:latest bash -c 'cd ~/frr/tests/topotests ; sudo pytest -nauto --dist=loadfile' +docker run -d --init --privileged --name frr-ubuntu22 --mount type=bind,source=/lib/modules,target=/lib/modules frr-ubuntu22:latest +``` + +# Running full topotest (container stops at end) + +``` +docker run --init -it --privileged --name frr-ubuntu22 \ + -v /lib/modules:/lib/modules frr-ubuntu22:latest \ + bash -c 'cd /home/frr/frr/tests/topotests; sudo pytest -nauto --dist=loadfile' ``` # Extract results from the above run into `run-results` dir and analyze @@ -20,10 +28,11 @@ docker run --init -it --privileged --name frr-ubuntu22 -v /lib/modules:/lib/modu tests/topotests/analyze.py -C frr-ubuntu22 -Ar run-results ``` -# Running +# Extract coverage from a stopped container into host FRR source tree ``` -docker run -d --init --privileged --name frr-ubuntu22 --mount type=bind,source=/lib/modules,target=/lib/modules frr-ubuntu22:latest +docker export frr-ubuntu22 | tar --strip=3 --wildcards -vx '*.gc??' +lcov -b $(pwd) --capture --directory . --output-file=coverage.info ``` # make check @@ -38,10 +47,10 @@ docker exec frr-ubuntu22 bash -c 'cd ~/frr ; make check' docker exec -it frr-ubuntu22 bash ``` -# topotest -- when Host O/S is Ubuntu only +# Run a specific topotest ``` -docker exec frr-ubuntu22 bash -c 'cd ~/frr/tests/topotests/ospf_topo1 ; sudo pytest test_ospf_topo1.py' +docker exec frr-ubuntu22 bash -c 'cd ~/frr/tests/topotests ; sudo pytest ospf_topo1/test_ospf_topo1.py' ``` # stop & remove container |