Ci: testing frame order and fps - #329
Conversation
d6b4a98 to
ffb4e92
Compare
| @@ -0,0 +1,4 @@ | |||
| [pytest] | |||
| markers = | |||
| d457: realsesne D457 camera | |||
There was a problem hiding this comment.
this marker mean the CI will work only on D457?
There was a problem hiding this comment.
Declaring a marker here helps avoid a warning by pytest for a line like: @pytest.mark.d457
| @pytest.mark.d457 | ||
| @pytest.mark.parametrize("frames", {20}) | ||
| @pytest.mark.parametrize("device", {'0', '2'}) | ||
| def test_fps(device, frames): |
There was a problem hiding this comment.
device mean video0? so this test is testing only one stream at a time?
There was a problem hiding this comment.
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.
|
Please add a description explain your test |
There was a problem hiding this comment.
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.pyto validate FPS accuracy and frame ordering across video formats - Updated
test_fw_version.pyto 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.
| if m: | ||
| w = int(m.group(1)) | ||
| h = int(m.group(2)) | ||
| last = (w ,h) |
There was a problem hiding this comment.
Remove extra space before the closing parenthesis in the tuple assignment. Should be (w, h) instead of (w ,h).
| stage('pytest') { | ||
| steps { | ||
| script { | ||
| sh 'pytest --tb=no test' |
There was a problem hiding this comment.
The command uses mixed indentation (tabs). Consider using consistent indentation (spaces) to match typical Groovy/Jenkins pipeline conventions.
| sh 'pytest --tb=no test' | |
| sh 'pytest --tb=no test' |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
120f9c9 to
c7a91b5
Compare
f7bb2c3 to
35637ec
Compare
Functional V4L2 camera FPS test verifies: