Feature: Adds test for both eth interfaces. Tests Sample 8 with new script and with the probes and cables positioned away from the PoE Converter. Also make sure GND is connected correcly for the probes.

This commit is contained in:
Pbopbo
2025-11-13 14:26:20 +01:00
parent ca3057157b
commit a6a852fbd9
48 changed files with 640249 additions and 9 deletions

View File

@@ -98,6 +98,10 @@ def main():
host_ip = "10.11.0.91" # Replace with the actual host IP
username = "caster"
# Ethernet interface IPs for EthPrim and EthSec
eth_prim_ip = "10.11.0.45"
eth_sec_ip = "10.11.0.70"
# Create a timestamped folder for logs and results
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
output_dir = os.path.join("results", f"test_{timestamp}")
@@ -122,15 +126,15 @@ def main():
output_dir
)
print("Running iperf3 test...")
print("Running iperf3 test for EthPrim...")
iperf3_server = run_iperf3_server(output_dir) # Start iperf3 server on the host
try:
remote_iperf3_client_log = "/tmp/iperf3_client.log"
local_iperf3_client_log = os.path.join(output_dir, "iperf3_client.log")
remote_iperf3_client_log = "/tmp/iperf3_client_prim.log"
local_iperf3_client_log = os.path.join(output_dir, "iperf3_client_prim.log")
start_background_command_and_measure(
dut_ip,
username,
f"iperf3 -c {host_ip}",
f"iperf3 -c {host_ip} -B {eth_prim_ip}",
remote_iperf3_client_log,
local_iperf3_client_log,
sample_number,
@@ -141,6 +145,25 @@ def main():
finally:
stop_iperf3_server(iperf3_server) # Ensure the server is stopped
print("Running iperf3 test for EthSec...")
iperf3_server = run_iperf3_server(output_dir) # Start iperf3 server on the host
try:
remote_iperf3_client_log = "/tmp/iperf3_client_sec.log"
local_iperf3_client_log = os.path.join(output_dir, "iperf3_client_sec.log")
start_background_command_and_measure(
dut_ip,
username,
f"iperf3 -c {host_ip} -B {eth_sec_ip}",
remote_iperf3_client_log,
local_iperf3_client_log,
sample_number,
"external",
"EthSec",
output_dir
)
finally:
stop_iperf3_server(iperf3_server) # Ensure the server is stopped
input("Switch power to PoE and press Enter to continue...")
print("Measuring baseline with PoE...")
@@ -153,7 +176,7 @@ def main():
start_background_command_and_measure(
dut_ip,
username,
"stress -c 2 --io 2 --vm 2 --timeout 15",
"stress -c 2 --io 2 --vm 2 --timeout 30",
remote_stress_log_poe,
local_stress_log_poe,
sample_number,
@@ -162,15 +185,15 @@ def main():
output_dir
)
print("Running iperf3 test with PoE...")
print("Running iperf3 test for EthPrim with PoE...")
iperf3_server = run_iperf3_server(output_dir) # Start iperf3 server on the host
try:
remote_iperf3_client_log_poe = "/tmp/iperf3_client_poe.log"
local_iperf3_client_log_poe = os.path.join(output_dir, "iperf3_client_poe.log")
remote_iperf3_client_log_poe = "/tmp/iperf3_client_prim_poe.log"
local_iperf3_client_log_poe = os.path.join(output_dir, "iperf3_client_prim_poe.log")
start_background_command_and_measure(
dut_ip,
username,
f"iperf3 -c {host_ip}",
f"iperf3 -c {host_ip} -B {eth_prim_ip}",
remote_iperf3_client_log_poe,
local_iperf3_client_log_poe,
sample_number,
@@ -181,6 +204,25 @@ def main():
finally:
stop_iperf3_server(iperf3_server) # Ensure the server is stopped
print("Running iperf3 test for EthSec with PoE...")
iperf3_server = run_iperf3_server(output_dir) # Start iperf3 server on the host
try:
remote_iperf3_client_log_poe = "/tmp/iperf3_client_sec_poe.log"
local_iperf3_client_log_poe = os.path.join(output_dir, "iperf3_client_sec_poe.log")
start_background_command_and_measure(
dut_ip,
username,
f"iperf3 -c {host_ip} -B {eth_sec_ip}",
remote_iperf3_client_log_poe,
local_iperf3_client_log_poe,
sample_number,
"PoE",
"EthSec",
output_dir
)
finally:
stop_iperf3_server(iperf3_server) # Ensure the server is stopped
print("All tests completed.")