Skip to content

Commit

Permalink
chore: multiple cases
Browse files Browse the repository at this point in the history
  • Loading branch information
penglei0 committed Jul 31, 2024
1 parent 1d4e997 commit 0072459
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 9 additions & 0 deletions src/config/one-concrete-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,12 @@ test:
node_config:
config_name: default
config_file: src/config/predefined.node_config.yaml
TEST_CASE_2:
description: "Test example"
if: true # set false, if you want to skip this test
topology:
config_name: 4-hops-linear-network
config_file: src/config/predefined.topology.yaml
node_config:
config_name: default
config_file: src/config/predefined.node_config.yaml
9 changes: 7 additions & 2 deletions src/run_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ def build_network(node_config: NodeConfig, top_config: TopologyConfig):
linear_network.build()
linear_network.start()
else:
linear_network.reload(cur_node_config, cur_top_config)
if cur_top_config.topology_type == "linear":
local_net_top = LinearTopology(cur_top_config)
else:
logging.error("Error: unsupported topology type.")
continue
linear_network.reload(cur_node_config, local_net_top)

# add test suites
iperf_test_conf = TestConfig(
Expand All @@ -120,4 +125,4 @@ def build_network(node_config: NodeConfig, top_config: TopologyConfig):
# perform the test
linear_network.perform_test()

linear_network.stop()
linear_network.stop()

0 comments on commit 0072459

Please sign in to comment.