Skip to content
Open
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
7 changes: 6 additions & 1 deletion .github/scripts/setup_validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,12 @@ stage_preflight() {
warn "preflight: out-of-tree ice driver not loaded (path=$ice_path)"
missing=1
fi
free_mb=$(awk '/HugePages_Free/ {print $2*2}' /proc/meminfo)
# Free hugepage memory in MiB, derived from the ACTUAL default page size
# (Hugepagesize in /proc/meminfo). The old `*2` assumed 2 MiB pages and
# misreported hosts booted with default_hugepagesz=1G (e.g. 32 free 1G
# pages -> 64 MiB instead of 32768 MiB). Backward compatible: on 2 MiB
# default hosts Hugepagesize=2048 kB so the factor is still 2.
free_mb=$(awk '/^HugePages_Free:/ {f=$2} /^Hugepagesize:/ {sz=$2} END {print f * (sz/1024)}' /proc/meminfo)
if ((free_mb < 1024)); then
warn "preflight: hugepages free is ${free_mb} MiB (<1024 MiB)"
missing=1
Expand Down
6 changes: 6 additions & 0 deletions tests/validation/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1471,6 +1471,12 @@ def factory(application: str):
return FFmpeg(
app_path=os.path.join(mtl_path, FFMPEG_PATH.removeprefix("./"))
)
elif application == "gstreamer":
from mtl_engine.gstreamer import GStreamer

# app_path is vestigial for GStreamer (gst-launch-1.0 is on PATH);
# pass the MTL build dir to satisfy the base constructor.
return GStreamer(app_path=mtl_path)
else:
raise ValueError(f"Unknown application: {application}")

Expand Down
8 changes: 8 additions & 0 deletions tests/validation/mtl_engine/GstreamerApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ def setup_gstreamer_st20p_tx_pipeline(
tx_queues: int,
tx_framebuff_num: int = None,
tx_fps: int = None,
enable_ptp: bool = False,
):
connection_params = create_connection_params(
dev_port=nic_port_list,
Expand Down Expand Up @@ -254,6 +255,9 @@ def setup_gstreamer_st20p_tx_pipeline(

pipeline_command.extend(["mtl_st20p_tx", f"tx-queues={tx_queues}"])

if enable_ptp:
pipeline_command.append("enable-ptp=true")

if tx_framebuff_num is not None:
pipeline_command.append(f"tx-framebuff-num={tx_framebuff_num}")

Expand All @@ -280,6 +284,7 @@ def setup_gstreamer_st20p_rx_pipeline(
rx_queues: int,
rx_framebuff_num: int = None,
rx_fps: int = None,
enable_ptp: bool = False,
):
connection_params = create_connection_params(
dev_port=nic_port_list,
Expand All @@ -305,6 +310,9 @@ def setup_gstreamer_st20p_rx_pipeline(
f"rx-fps={framerate}",
]

if enable_ptp:
pipeline_command.append("enable-ptp=true")

for key, value in connection_params.items():
pipeline_command.append(f"{key}={value}")

Expand Down
Loading
Loading