Skip to content

Commit

Permalink
Remove Rx and Tx checking results as no summary in logs is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
Falron98 committed Jan 31, 2025
1 parent 2d21904 commit 504090d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 43 deletions.
42 changes: 1 addition & 41 deletions tests/validation/tests/Engine/GstreamerApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ def execute_test(
input_file: str,
output_file: str,
type: str,
fps: int = None,
sleep_interval: int = 0,
tx_first: bool = True,
):
Expand All @@ -306,17 +305,9 @@ def execute_test(
time.sleep(sleep_interval)
tx_process = call(" ".join(tx_command), cwd=build, timeout=120)

tx_output = wait(tx_process)
wait(tx_process)
wait(rx_process)

# For now checking output from logs is disabled as it's not working as intended

# if type == "st20":
# tx_result = check_tx_output(fps=fps, output=tx_output.splitlines())
# rx_result = check_rx_output(fps=fps, output=rx_output.splitlines())
# if tx_result is False:
# return False

file_compare = compare_files(input_file, output_file)

log_info(f"File comparison: {file_compare}")
Expand All @@ -326,37 +317,6 @@ def execute_test(

return False


def check_tx_output(fps: int, output: list) -> bool:
tx_fps_result = None
for line in output:
if "TX_VIDEO_SESSION(0,0:st20sink): fps" in line:
tx_fps_result = line
if tx_fps_result is not None:
for x in range(fps, fps - 3, -1):
if f"fps {x}" in tx_fps_result:
log_info(f"FPS > {x}")
return True

log_fail("tx session failed")
return False


def check_rx_output(fps: int, output: list) -> bool:
rx_fps_result = None
for line in output:
if "RX_VIDEO_SESSION(0,0:st20src): fps" in line:
rx_fps_result = line
if rx_fps_result is not None:
for x in range(fps, fps - 2, -1):
if f"fps {x}" in line:
log_info(f"FPS > {x}")
return True

log_fail("rx session failed")
return False


def compare_files(input_file, output_file):
if os.path.exists(input_file) and os.path.exists(output_file):
input_file_size = os.path.getsize(input_file)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ def test_video_format(
build=build,
tx_command=tx_config,
rx_command=rx_config,
fps=video_file["fps"],
input_file=input_file_path,
output_file=os.path.join(media, "output_video.yuv"),
type="st20",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def test_video_resolutions(
build=build,
tx_command=tx_config,
rx_command=rx_config,
fps=video_file["fps"],
input_file=input_file_path,
output_file=os.path.join(media, "output_video.yuv"),
type="st20",
Expand Down

0 comments on commit 504090d

Please sign in to comment.