From b8ba1a104247764e7562f0dbb95ef7e7c2c2b3b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Thu, 11 Jun 2026 13:13:17 +0200 Subject: [PATCH] test: spec: Allow to generate test specification without logical topology --- test/spec/generate_spec.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/spec/generate_spec.py b/test/spec/generate_spec.py index 72085a6e..ee676ba0 100755 --- a/test/spec/generate_spec.py +++ b/test/spec/generate_spec.py @@ -140,7 +140,9 @@ class TestCase: if title is None: title = visitor.name - self.gen_topology() + has_topology = os.path.exists(self.topo_dot) + if has_topology: + self.gen_topology() with open(self.spec_path, "w", encoding='utf-8') as spec: # This is the test name/title for the test-specification.pdf, @@ -156,8 +158,9 @@ class TestCase: spec.write("==== Description\n\n") spec.write(description + "\n\n") - spec.write("==== Topology\n\n") - spec.write(f"image::topology.svg[{title} topology, align=center, scaledwidth=75%]\n\n") + if has_topology: + spec.write("==== Topology\n\n") + spec.write(f"image::topology.svg[{title} topology, align=center, scaledwidth=75%]\n\n") spec.write("==== Sequence\n\n") spec.writelines([f". {step}\n" for step in test_steps])