Skip to content

CI: testing frame order and fps - #331

Merged
ymodlin merged 29 commits into
realsenseai:devfrom
Kontra2B:CI
Jan 5, 2026
Merged

CI: testing frame order and fps#331
ymodlin merged 29 commits into
realsenseai:devfrom
Kontra2B:CI

Conversation

@Kontra2B

Copy link
Copy Markdown
Contributor

Functional V4L2 camera FPS test verifies:

  • frame order for repeated and dropped frames (no frame number repetition and 1 drop allowed)
  • each frame FPS calculated from time delta falls within KPI
  • requeseted frame count arrive

@Kontra2B
Kontra2B requested review from Copilot and ymodlin December 29, 2025 12:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds functional V4L2 camera FPS testing to verify frame order, frame rate accuracy, and frame count delivery. The test validates that frames arrive in sequence (with at most 1 drop allowed), each frame's FPS falls within a 5% KPI threshold, and the requested frame count is received.

Key changes:

  • New test_fps.py implementing comprehensive FPS verification with frame order checking
  • Enhanced error handling and Python 3 compatibility fixes in existing tests
  • Jenkins pipeline configuration for automated CI testing

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/test_fps.py New comprehensive FPS test verifying frame order, timing, and count
test/test_fw_version.py Added .decode() calls for Python 3 compatibility and improved error messages
test/test_metadata/build.sh Added debug flags and removed test execution from build script
test/run_ci.py Improved exception logging and added missing sys.exit call
test/pytest.ini Added pytest configuration with d457 marker
test/groovy/LRS_libci_pipeline.groovy New Jenkins pipeline for automated testing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/test_fps.py Outdated
# print(f"{frame}", end='')
if last:
assert frame > last, f"Repeated frame: {frame}"
assert (frame - last) < 3 , f"Frames dropped between: {last} and {frame}"

Copilot AI Dec 29, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra space before comma. Should be < 3, instead of < 3 ,

Suggested change
assert (frame - last) < 3 , f"Frames dropped between: {last} and {frame}"
assert (frame - last) < 3, f"Frames dropped between: {last} and {frame}"

Copilot uses AI. Check for mistakes.
Comment thread test/run_ci.py
check=True )
except Exception as e:
print( "Exception occurred.")
print("Exception occurred: {}".format( e ))

Copilot AI Dec 29, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent spacing in format() call - there's an extra space after the opening parenthesis and before the closing one. Should be .format(e) for consistency with line 36 in test_fw_version.py

Suggested change
print("Exception occurred: {}".format( e ))
print("Exception occurred: {}".format(e))

Copilot uses AI. Check for mistakes.
Comment thread test/run_ci.py
except getopt.GetoptError as err:
print( err )
usage()
sys.exit ( 1 )

Copilot AI Dec 29, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent spacing in sys.exit() call - there are extra spaces before and after the parentheses. Should be sys.exit(1) to match Python conventions and the existing sys.exit(0) pattern in the usage() function

Suggested change
sys.exit ( 1 )
sys.exit(1)

Copilot uses AI. Check for mistakes.
@Kontra2B
Kontra2B force-pushed the CI branch 3 times, most recently from 259da76 to 77e230d Compare December 29, 2025 16:34
@ymodlin
ymodlin merged commit cfcefcf into realsenseai:dev Jan 5, 2026
5 checks passed
@@ -0,0 +1,76 @@
import org.jenkinsci.plugins.workflow.steps.FlowInterruptedException

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest renaming the file as libci is not related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants