Skip to content

Commit fe2d0f4

Browse files
committed
test/case: simplify AsciiDoc image references
This commit greatly simplifies AsciiDoc image references in generated Readme.adoc files. The two focused use-cases that remain after this change are working references in: - Generated output/images/test-report.pdf - Viewing test's Readme.adoc from GitHub Previously we aimed to have working images also when the test's Readme was included in the parent directory's Readme.adoc. This, however, is not supported as of this commit. It seems unlikely also to ever be a supported feature of AsciiDoc on GitHub, for details, see the following issue: <github/markup#1095> Signed-off-by: Joachim Wiberg <[email protected]>
1 parent c14140a commit fe2d0f4

File tree

85 files changed

+421
-1203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+421
-1203
lines changed
Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_hardware/usb]
2+
13
=== USB configuration
24
==== Description
35
This test checks if the configuration is consistent with hardware state,
@@ -11,18 +13,9 @@ If this pass you can be certain that the configuration of the USB
1113
port is handled correctly.
1214

1315
==== Topology
14-
ifdef::topdoc[]
15-
image::{topdoc}../../test/case/ietf_hardware/usb/topology.svg[USB configuration topology]
16-
endif::topdoc[]
17-
ifndef::topdoc[]
18-
ifdef::testgroup[]
19-
image::usb/topology.svg[USB configuration topology]
20-
endif::testgroup[]
21-
ifndef::testgroup[]
22-
image::topology.svg[USB configuration topology]
23-
endif::testgroup[]
24-
endif::topdoc[]
25-
==== Test sequence
16+
image::topology.svg[USB configuration topology, align=center, scaledwidth=75%]
17+
18+
==== Sequence
2619
. Set up topology and attach to target DUT
2720
. Unlock all USB ports
2821
. Verify that all USB ports are unlocked
@@ -36,5 +29,3 @@ endif::topdoc[]
3629
. Verify USB port remain unlocked after reboot
3730

3831

39-
<<<
40-
Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
1+
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_hardware/usb_two_ports]
2+
13
=== USB configuration with two USB ports
24
==== Description
35
Test that the USB locked/unlocked configuration is consistent
46
when having two USB ports.
57

68
==== Topology
7-
ifdef::topdoc[]
8-
image::{topdoc}../../test/case/ietf_hardware/usb_two_ports/topology.svg[USB configuration with two USB ports topology]
9-
endif::topdoc[]
10-
ifndef::topdoc[]
11-
ifdef::testgroup[]
12-
image::usb_two_ports/topology.svg[USB configuration with two USB ports topology]
13-
endif::testgroup[]
14-
ifndef::testgroup[]
15-
image::topology.svg[USB configuration with two USB ports topology]
16-
endif::testgroup[]
17-
endif::topdoc[]
18-
==== Test sequence
9+
image::topology.svg[USB configuration with two USB ports topology, align=center, scaledwidth=75%]
10+
11+
==== Sequence
1912
. Set up topology and attach to target DUTs
2013
. Lock the first USB port and unlock the second USB port
2114
. Verify that the correct port is locked and the correct one is unlocked
2215
. Unlock the first USB port, and lock the second USB port
2316
. Verify that the correct port is locked and the correct one is unlocked
2417

2518

26-
<<<
27-

test/case/ietf_interfaces/bridge.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
- name: bridge_basic
1616
case: bridge_basic/test.py
1717

18+
- name: dual_bridge
19+
case: dual_bridge/test.py
20+
1821
- name: bridge_veth
1922
case: bridge_veth/test.py
2023

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/bridge_basic]
2+
13
=== Bridge basic
24
==== Description
35
Test basic connectivity to a bridge
@@ -11,22 +13,11 @@ Test basic connectivity to a bridge
1113
....
1214

1315
==== Topology
14-
ifdef::topdoc[]
15-
image::{topdoc}../../test/case/ietf_interfaces/bridge_basic/topology.svg[Bridge basic topology]
16-
endif::topdoc[]
17-
ifndef::topdoc[]
18-
ifdef::testgroup[]
19-
image::bridge_basic/topology.svg[Bridge basic topology]
20-
endif::testgroup[]
21-
ifndef::testgroup[]
22-
image::topology.svg[Bridge basic topology]
23-
endif::testgroup[]
24-
endif::topdoc[]
25-
==== Test sequence
16+
image::topology.svg[Bridge basic topology, align=center, scaledwidth=75%]
17+
18+
==== Sequence
2619
. Set up topology and attach to target DUT
2720
. Configure single bridge with a single physical port, bridge @ IP 10.0.0.2
2821
. Verify ping 10.0.0.2 is possible from host:data
2922

3023

31-
<<<
32-

test/case/ietf_interfaces/bridge_fwd_dual_dut/bridge_fwd_dual_dut.adoc

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/bridge_fwd_dual_dut]
2+
13
=== Bridge forwarding dual DUTs
24
==== Description
35
Ping through two bridges on two different DUTs.
@@ -23,22 +25,11 @@ Ping through two bridges on two different DUTs.
2325
....
2426

2527
==== Topology
26-
ifdef::topdoc[]
27-
image::{topdoc}../../test/case/ietf_interfaces/bridge_fwd_dual_dut/topology.svg[Bridge forwarding dual DUTs topology]
28-
endif::topdoc[]
29-
ifndef::topdoc[]
30-
ifdef::testgroup[]
31-
image::bridge_fwd_dual_dut/topology.svg[Bridge forwarding dual DUTs topology]
32-
endif::testgroup[]
33-
ifndef::testgroup[]
34-
image::topology.svg[Bridge forwarding dual DUTs topology]
35-
endif::testgroup[]
36-
endif::topdoc[]
37-
==== Test sequence
28+
image::topology.svg[Bridge forwarding dual DUTs topology, align=center, scaledwidth=75%]
29+
30+
==== Sequence
3831
. Set up topology and attach to target DUT
3932
. Configure a bridge with triple physical port
4033
. Verify ping 10.0.0.3 and 10.0.0.4 from host:data11
4134

4235

43-
<<<
44-

test/case/ietf_interfaces/bridge_fwd_sgl_dut/bridge_fwd_sgl_dut.adoc

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/bridge_fwd_sgl_dut]
2+
13
=== Bridge forwarding single DUTs
24
==== Description
35
Tests forwarding through a DUT with two bridged interfaces on one DUT.
@@ -23,22 +25,11 @@ Tests forwarding through a DUT with two bridged interfaces on one DUT.
2325
....
2426

2527
==== Topology
26-
ifdef::topdoc[]
27-
image::{topdoc}../../test/case/ietf_interfaces/bridge_fwd_sgl_dut/topology.svg[Bridge forwarding single DUTs topology]
28-
endif::topdoc[]
29-
ifndef::topdoc[]
30-
ifdef::testgroup[]
31-
image::bridge_fwd_sgl_dut/topology.svg[Bridge forwarding single DUTs topology]
32-
endif::testgroup[]
33-
ifndef::testgroup[]
34-
image::topology.svg[Bridge forwarding single DUTs topology]
35-
endif::testgroup[]
36-
endif::topdoc[]
37-
==== Test sequence
28+
image::topology.svg[Bridge forwarding single DUTs topology, align=center, scaledwidth=75%]
29+
30+
==== Sequence
3831
. Set up topology and attach to target DUT
3932
. Configure a bridge with dual physical port
4033
. Verify ping from host:data1 to 10.0.0.2
4134

4235

43-
<<<
44-
Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/bridge_stp_basic]
2+
13
=== Bridge STP Basic
24
==== Description
35
First, verify that a fully connected mesh of 4 DUTs is pruned to a
@@ -12,18 +14,9 @@ that a spanning tree rooted at A is formed, with B, C, and D all
1214
directly connected to A.
1315

1416
==== Topology
15-
ifdef::topdoc[]
16-
image::{topdoc}../../test/case/ietf_interfaces/bridge_stp_basic/topology.svg[Bridge STP Basic topology]
17-
endif::topdoc[]
18-
ifndef::topdoc[]
19-
ifdef::testgroup[]
20-
image::bridge_stp_basic/topology.svg[Bridge STP Basic topology]
21-
endif::testgroup[]
22-
ifndef::testgroup[]
23-
image::topology.svg[Bridge STP Basic topology]
24-
endif::testgroup[]
25-
endif::topdoc[]
26-
==== Test sequence
17+
image::topology.svg[Bridge STP Basic topology, align=center, scaledwidth=75%]
18+
19+
==== Sequence
2720
. Set up topology and attach to target DUT
2821
. Configure a bridge with spanning tree eneabled on dut a, b, c, and d
2922
. Add an IP address to each host interface in the 10.0.0.0/24 subnet
@@ -35,5 +28,3 @@ endif::topdoc[]
3528
. Verify that host:a can reach host:{b,c,d}
3629

3730

38-
<<<
39-
Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/bridge_veth]
2+
13
=== Bridge with a physical port and a veth
24
==== Description
35
This tests the possibility to add software added interfaces, in this case
@@ -13,22 +15,11 @@ PING --> br0
1315
....
1416

1517
==== Topology
16-
ifdef::topdoc[]
17-
image::{topdoc}../../test/case/ietf_interfaces/bridge_veth/topology.svg[Bridge with a physical port and a veth topology]
18-
endif::topdoc[]
19-
ifndef::topdoc[]
20-
ifdef::testgroup[]
21-
image::bridge_veth/topology.svg[Bridge with a physical port and a veth topology]
22-
endif::testgroup[]
23-
ifndef::testgroup[]
24-
image::topology.svg[Bridge with a physical port and a veth topology]
25-
endif::testgroup[]
26-
endif::topdoc[]
27-
==== Test sequence
18+
image::topology.svg[Bridge with a physical port and a veth topology, align=center, scaledwidth=75%]
19+
20+
==== Sequence
2821
. Set up topology and attach to target DUT
2922
. Configure bridged eth port and veth pair with IP 10.0.0.2
3023
. Verify ping from host:data to 10.0.0.2
3124

3225

33-
<<<
34-
Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,19 @@
1+
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/bridge_vlan]
2+
13
=== Bridge VLAN
24
==== Description
35
Verify VLAN filtering bridge, with a VLAN trunk to a neighboring device,
46
which in turn untags one VLAN outisde a non-VLAN filtering bridge.
57

68
.Logical network setup
7-
ifdef::topdoc[]
8-
image::{topdoc}../../test/case/ietf_interfaces/bridge_vlan/bridge-vlan.svg[]
9-
endif::topdoc[]
10-
ifndef::topdoc[]
11-
ifdef::testgroup[]
12-
image::bridge_vlan/bridge-vlan.svg[]
13-
endif::testgroup[]
14-
ifndef::testgroup[]
15-
image::bridge-vlan.svg[]
16-
endif::testgroup[]
17-
endif::topdoc[]
9+
image::bridge-vlan.svg[align=center, scaledwidth=75%]
1810

1911
==== Topology
20-
ifdef::topdoc[]
21-
image::{topdoc}../../test/case/ietf_interfaces/bridge_vlan/topology.svg[Bridge VLAN topology]
22-
endif::topdoc[]
23-
ifndef::topdoc[]
24-
ifdef::testgroup[]
25-
image::bridge_vlan/topology.svg[Bridge VLAN topology]
26-
endif::testgroup[]
27-
ifndef::testgroup[]
28-
image::topology.svg[Bridge VLAN topology]
29-
endif::testgroup[]
30-
endif::topdoc[]
31-
==== Test sequence
12+
image::topology.svg[Bridge VLAN topology, align=center, scaledwidth=75%]
13+
14+
==== Sequence
3215
. Set up topology and attach to target DUT
3316
. Configure DUTs
3417
. Verify ping from host:data to 10.0.0.2 and 10.0.0.3
3518

3619

37-
<<<
38-

test/case/ietf_interfaces/bridge_vlan/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
which in turn untags one VLAN outisde a non-VLAN filtering bridge.
77
88
.Logical network setup
9-
image::bridge-vlan.svg[]
9+
image::bridge-vlan.svg[align=center, scaledwidth=75%]
1010
1111
"""
1212
import infamy

0 commit comments

Comments
 (0)