Skip to content

Gstreamer dual tests #1244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
721 changes: 721 additions & 0 deletions tests/validation/mtl_engine/GstreamerApp.py

Large diffs are not rendered by default.

23 changes: 15 additions & 8 deletions tests/validation/mtl_engine/RxTxApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,7 @@ def add_dual_interfaces(
tx_config["interfaces"][0]["name"] = tx_nic_port_list[0]

# Configure RX host interface only
rx_config["interfaces"][0]["name"] = rx_nic_port_list[1]
rx_config["interfaces"][0]["name"] = rx_nic_port_list[0]

if test_mode == "unicast":
tx_config["interfaces"][0]["ip"] = unicast_ip_dict["tx_interfaces"]
Expand Down Expand Up @@ -1673,20 +1673,27 @@ def execute_dual_test(
tx_config = config["tx_config"]
rx_config = config["rx_config"]

tx_config_json = json.dumps(tx_config, indent=4)
rx_config_json = json.dumps(rx_config, indent=4)

# Log test start
logger.info(f"Starting dual RxTxApp test: {get_case_id()}")
log_to_file(f"Starting dual RxTxApp test: {get_case_id()}", tx_host, build)
log_to_file(f"Starting dual RxTxApp test: {get_case_id()}", rx_host, build)
log_to_file(f"TX config: {json.dumps(tx_config, indent=4)}", tx_host, build)
log_to_file(f"RX config: {json.dumps(rx_config, indent=4)}", rx_host, build)
log_to_file(f"TX config: {tx_config_json}", tx_host, build)
log_to_file(f"RX config: {rx_config_json}", rx_host, build)

# Prepare TX config
tx_config_file = f"{build}/tests/tx_config.json"
tx_f = tx_host.connection.path(build, "tests", "tx_config.json")
tx_f.write_text(tx_config, encoding="utf-8")
tx_json_content = tx_config_json.replace('"', '\\"')
tx_f.write_text(tx_json_content)

# Prepare RX config
rx_f = tx_host.connection.path(build, "tests", "rx_config.json")
rx_f.write_text(rx_config, encoding="utf-8")
rx_config_file = f"{build}/tests/rx_config.json"
rx_f = rx_host.connection.path(build, "tests", "rx_config.json")
rx_json_content = rx_config_json.replace('"', '\\"')
rx_f.write_text(rx_json_content)

# Adjust test_time for high-res/fps/replicas
if (
Expand All @@ -1710,8 +1717,8 @@ def execute_dual_test(
if ptp:
base_command += " --ptp"

tx_command = f"{base_command} --config_file {tx_config}"
rx_command = f"{base_command} --config_file {rx_config}"
tx_command = f"{base_command} --config_file {tx_config_file}"
rx_command = f"{base_command} --config_file {rx_config_file}"

logger.info(f"TX Command: {tx_command}")
logger.info(f"RX Command: {rx_command}")
Expand Down
Loading