CI: testing frame order and fps - #331
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
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.
| # print(f"{frame}", end='') | ||
| if last: | ||
| assert frame > last, f"Repeated frame: {frame}" | ||
| assert (frame - last) < 3 , f"Frames dropped between: {last} and {frame}" |
There was a problem hiding this comment.
Extra space before comma. Should be < 3, instead of < 3 ,
| assert (frame - last) < 3 , f"Frames dropped between: {last} and {frame}" | |
| assert (frame - last) < 3, f"Frames dropped between: {last} and {frame}" |
| check=True ) | ||
| except Exception as e: | ||
| print( "Exception occurred.") | ||
| print("Exception occurred: {}".format( e )) |
There was a problem hiding this comment.
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
| print("Exception occurred: {}".format( e )) | |
| print("Exception occurred: {}".format(e)) |
| except getopt.GetoptError as err: | ||
| print( err ) | ||
| usage() | ||
| sys.exit ( 1 ) |
There was a problem hiding this comment.
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
| sys.exit ( 1 ) | |
| sys.exit(1) |
259da76 to
77e230d
Compare
| @@ -0,0 +1,76 @@ | |||
| import org.jenkinsci.plugins.workflow.steps.FlowInterruptedException | |||
There was a problem hiding this comment.
I suggest renaming the file as libci is not related
Functional V4L2 camera FPS test verifies: