Skip to content

Commit 4698934

Browse files
committed
Test: Remove IP address reading from JSON
1 parent 11636be commit 4698934

File tree

2 files changed

+0
-47
lines changed

2 files changed

+0
-47
lines changed

tests/validation/mtl_engine/RxTxApp.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from .execute import log_fail, run
1616

1717
RXTXAPP_PATH = "./tests/tools/RxTxApp/build/RxTxApp"
18-
json_filename = os.path.join(sys.path[0], "ip_addresses.json")
1918
logger = logging.getLogger(__name__)
2019

2120

@@ -57,29 +56,6 @@ def capture_stdout(proc, proc_name: str):
5756
return ""
5857

5958

60-
def read_ip_addresses_from_json(filename: str):
61-
global unicast_ip_dict, multicast_ip_dict, kernel_ip_dict
62-
try:
63-
with open(filename, "r") as ips:
64-
ip_addresses = json.load(ips)
65-
try:
66-
unicast_ip_dict = ip_addresses["unicast_ip_dict"]
67-
multicast_ip_dict = ip_addresses["multicast_ip_dict"]
68-
kernel_ip_dict = ip_addresses["kernel_ip_dict"]
69-
except Exception:
70-
logger.warning(
71-
f"File {filename} does not contain proper input, check "
72-
"ip_addresses.json.example for a schema. It might have "
73-
"been loaded partially. Where not specified, "
74-
"default was set."
75-
)
76-
except Exception:
77-
logger.warning(
78-
f"File {filename} could not be loaded properly! "
79-
"Default values are set for all IPs."
80-
)
81-
82-
8359
def create_empty_config() -> dict:
8460
return copy.deepcopy(rxtxapp_config.config_empty)
8561

@@ -1164,9 +1140,6 @@ def sanitize_filename(name: str) -> str:
11641140
return re.sub(r"[^A-Za-z0-9_.-]", "_", name)
11651141

11661142

1167-
read_ip_addresses_from_json(json_filename)
1168-
1169-
11701143
def create_empty_dual_config() -> dict:
11711144
return {
11721145
"tx_config": copy.deepcopy(rxtxapp_config.config_empty_tx),

tests/validation/mtl_engine/ip_addresses.json.example

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)