Skip to content

Ci: testing frame order and fps - #329

Closed
Kontra2B wants to merge 23 commits into
realsenseai:devfrom
Kontra2B:CI
Closed

Ci: testing frame order and fps#329
Kontra2B wants to merge 23 commits into
realsenseai:devfrom
Kontra2B:CI

Conversation

@Kontra2B

@Kontra2B Kontra2B commented Dec 16, 2025

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 a review from ymodlin December 16, 2025 15:11
@Kontra2B
Kontra2B force-pushed the CI branch 2 times, most recently from d6b4a98 to ffb4e92 Compare December 19, 2025 14:29
Comment thread test/pytest.ini Outdated
@@ -0,0 +1,4 @@
[pytest]
markers =
d457: realsesne D457 camera

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.

this marker mean the CI will work only on D457?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Declaring a marker here helps avoid a warning by pytest for a line like: @pytest.mark.d457

Comment thread test/test_fps.py
@pytest.mark.d457
@pytest.mark.parametrize("frames", {20})
@pytest.mark.parametrize("device", {'0', '2'})
def test_fps(device, frames):

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.

device mean video0? so this test is testing only one stream at a time?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

2 devices: /dev/video0 and /dev/video2. 2 test are executed. One for each device at a time. Can be run in parallel with pytest plugin pytest-xdist.

@ymodlin
ymodlin requested a review from Copilot December 22, 2025 08:12
@ymodlin

ymodlin commented Dec 22, 2025

Copy link
Copy Markdown
Collaborator

Please add a description explain your test

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 new automated testing for frame order and FPS validation in CI, along with improvements to existing test infrastructure. The changes introduce a comprehensive FPS testing framework that validates frame sequence ordering and frame rate accuracy across different video formats.

Key Changes:

  • Added new test_fps.py to validate FPS accuracy and frame ordering across video formats
  • Updated test_fw_version.py to properly decode subprocess outputs and improve error messages
  • Added Jenkins pipeline configuration for automated test execution

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 and frame order validation test
test/test_fw_version.py Added proper byte string decoding and improved error messages
test/test_metadata/build.sh Added debug flags and removed test execution from build script
test/run_ci.py Enhanced error reporting and added missing sys.exit call
test/pytest.ini Added pytest configuration with d457 marker definition
test/groovy/LRS_libci_pipeline.groovy New Jenkins pipeline configuration for pytest execution

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

Comment thread test/pytest.ini Outdated
Comment thread test/test_fps.py Outdated
if m:
w = int(m.group(1))
h = int(m.group(2))
last = (w ,h)

Copilot AI Dec 22, 2025

Copy link

Choose a reason for hiding this comment

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

Remove extra space before the closing parenthesis in the tuple assignment. Should be (w, h) instead of (w ,h).

Copilot uses AI. Check for mistakes.
Comment thread test/groovy/LRS_libci_pipeline.groovy Outdated
stage('pytest') {
steps {
script {
sh 'pytest --tb=no test'

Copilot AI Dec 22, 2025

Copy link

Choose a reason for hiding this comment

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

The command uses mixed indentation (tabs). Consider using consistent indentation (spaces) to match typical Groovy/Jenkins pipeline conventions.

Suggested change
sh 'pytest --tb=no test'
sh 'pytest --tb=no test'

Copilot uses AI. Check for mistakes.
@Kontra2B
Kontra2B force-pushed the CI branch 11 times, most recently from 120f9c9 to c7a91b5 Compare December 23, 2025 13:19
@Kontra2B
Kontra2B force-pushed the CI branch 4 times, most recently from f7bb2c3 to 35637ec Compare December 23, 2025 15:52
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.

3 participants