testing
Skill9.1k starsChanged 27 days agoApache-2.0View on GitHub
Run, filter and debug librealsense unit tests - pytest tests and the legacy C++ test runner (run-unit-tests.py), tags, devices, nightly/weekly contexts. Use before running tests.
194 other projects use a version of this.
Trending
Steady talk.about the whole repository
Most recently taken up by
- maideps/ai-harness-frameworktheir own version, first seen Nov 16, 2026
- FAHTHIZ/oasistheir own version, first seen Nov 16, 2026
- fatihkan/baditheir own version, first seen Nov 16, 2026
- magnusrodseth/dotfilestheir own version, first seen Nov 16, 2026
- skillberry-ai/cap-evolvetheir own version, first seen Nov 15, 2026
- timmo001/skillstheir own version, first seen Nov 15, 2026
Who's talking about realsenseai/librealsense
- NixOS/nixpkgs“librealsense: add missing support to udev rules”GitHub · Jan 6, 2026 · 2 reactions
- David-Martel/librealsense“fix(fw-update): stop device handles before logger teardown”GitHub · Jul 17, 2026 · 1 reactions
- Bradly187/Personal-Desktop-Agent“chore(deps): bump the python-minor-patch group across 1 directory with 8 updates”GitHub · Nov 2, 2026
- OpenGraphLabs/oglo-python“build(deps-dev): bump the python-dependencies group across 1 directory with 3 updates”GitHub · Nov 1, 2026
- huggingface/lerobot“docs: fix dead Isaac Teleop and RealSense links”GitHub · Oct 30, 2026
The biggest 5 of 34 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 34
Talked about on GitHub (34 times).
On GitHub · 34
- Jan 6, 2026librealsense: add missing support to udev rules — NixOS/nixpkgs2 reactions · 7 comments
- Jul 17, 2026fix(fw-update): stop device handles before logger teardown — David-Martel/librealsense1 reaction · 1 comment
- Nov 2, 2026chore(deps): bump the python-minor-patch group across 1 directory with 8 updates — Bradly187/Personal-Desktop-Agent0 reactions
- Nov 1, 2026build(deps-dev): bump the python-dependencies group across 1 directory with 3 updates — OpenGraphLabs/oglo-python0 reactions
- Oct 30, 2026docs: fix dead Isaac Teleop and RealSense links — huggingface/lerobot0 reactions · 1 comment
29 more on GitHub
- Oct 22, 2026build(deps): bump pyrealsense2 from 2.58.4.10922 to 2.59.1.11053 — nvidia-holoscan/holoscan-telesurgery0 reactions
- Oct 20, 2026[D585][GMSL_MUX] Support independent PD 15/30 FPS profiles — polejoe/librealsense0 reactions · 1 comment
- Oct 17, 2026Update pyrealsense2 requirement from >=2.55 to >=2.59.1.11053 — bnrohit/hybrid-rf-scanner0 reactions
- Oct 11, 2026librealsense 2.59.1 — Homebrew/homebrew-core0 reactions · 2 comments
- Oct 4, 2026pyrealsense2: Add version 2.58.4.10922 — riseproject-dev/python-wheels0 reactions · 1 comment
- Sep 23, 2026Add rocm-enabled librealsense package — gbionics/rock-the-conda0 reactions
- Sep 23, 2026Add librealsense — gbionics/rock-the-conda0 reactions · 3 comments
- Sep 14, 2026librealsense: update recipe to latest stable version 2.58.1 — conan-io/conan-center-index0 reactions · 1 comment
- Sep 14, 2026[RSDEV-14616] Use BA10 exclusively for D500 RGB calibration — realsenseai/realsense_mipi_platform_driver0 reactions · 3 comments
- Sep 5, 2026Update pyrealsense2 requirement from >=2.55 to >=2.58.4.10922 — bnrohit/hybrid-rf-scanner0 reactions · 1 comment
- Sep 2, 2026[RSDEV-14097] Expose D585 GMSL gyro sensitivity — realsenseai/realsense_mipi_platform_driver0 reactions
- Aug 31, 2026Package rocm variant of librealsense — conda-forge/librealsense-feedstock0 reactions · 1 comment
- Aug 30, 2026librealsense 2.58.4 — Homebrew/homebrew-core0 reactions · 1 comment
- Aug 28, 2026Fix RVIZ Vizualization of the RealSense D435i Camera Stability and Performance Via ROS Network — arcs-tmu/laika0 reactions
- Aug 15, 2026Update pyrealsense2 requirement from >=2.55 to >=2.58.3.10794 — bnrohit/hybrid-rf-scanner0 reactions · 1 comment
- Aug 5, 2026RSDEV-13232 Integrate D500 stream-group runtime — ghu3/librealsense0 reactions · 4 comments
- Aug 5, 2026Bake ROS 2, RealSense, SiMa CLI, and GitHub tooling into the ARM64 SDK image — sima-vertical-solutions/ros2-sdk0 reactions
- Jul 20, 2026Add python3-pyrealsense2-pip rosdep key to python.yaml — ros/rosdistro0 reactions · 1 comment
- Jul 19, 2026librealsense 2.58.3 — Homebrew/homebrew-core0 reactions · 1 comment
- Jul 9, 2026Support launching Docker GUI apps from Fedora Wayland via XWayland — amoffat/librealsense0 reactions
- Jul 6, 2026Add D401 GMSL dual-RGB support (POC) — ashrafk93/librealsense0 reactions
- Jun 29, 2026chore(deps): bump pyrealsense2 from 2.58.1.10581 to 2.58.2.10647 — AliaksandrNazaruk/janus-camera-stack0 reactions · 1 comment
- Jun 24, 2026Ashraf/zerocopy pr1 — ashrafk93/librealsense0 reactions
- Jun 12, 2026Add placeholder workflow to register build-deb-packages trigger — locusrobotics/librealsense0 reactions
- Mar 11, 2026Add aligned depth topic for RGBD sensor — gazebosim/gz-sim0 reactions · 1 comment
- Feb 17, 2026`pixel_to_real_world` service fails in real mode due to missing `/camera/depth/camera_info` publisher — Final-Project-ROS2/vision0 reactions
- Jan 27, 2026Reliability of the AI-Autostart — A13k5-5/COMP0016_2025_Team11_no-ui-game0 reactions · 1 comment
- Jan 24, 2026[day 1] — z18k/AI-Vision-Learning0 reactions
- Dec 4, 2025[realsense2] update to v2.56.5 — microsoft/vcpkg0 reactions · 2 comments
Used with
Projects with it also use bundle-dependency-prs, update-library-template and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillbundle-dependency-prs
Fix broken dependency update PRs and aggregate the ones that work into one PR.
Also in 7 projects that use this
MicrosoftSkillupdate-library-template
Merges the latest Library.Template into this repo (at position of HEAD) and resolves conflicts.
Also in 7 projects that use this
zetaloopSkillassign-copilot
Assigns a GitHub issue to the Copilot coding agent, optionally specifying a custom agent. Use this when asked to assign an issue to Copilot or delegate an issue to CCA.
Also in 3 projects that use this
NVIDIA-NeMoSkillbuild-and-dependency
Dev environment setup for Megatron Bridge — container-based development, uv package management, lockfile regeneration, adding dependencies, Slurm container usage, and common build pitfalls.
Also in 3 projects that use this
timmo001Skillchangeset-scope
Keep all scoped code work contained to the user-defined changeset. Use for implementation, fixes, diagnosis, refactoring, cleanup, and review when explicit instructions, named files, diffs, branches, pull requests, or injected work scopes define the boundary.
Also in 3 projects that use this
JetBrainsSkillmodule-dependencies
Add or modify IntelliJ module dependencies in `.iml` files.
Also in 3 projects that use this
Other versions194 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 194
- modelcontextprotocol/servers★ 92ksame name
- lobehub/lobe-chat★ 86ksame name
- lobehub/lobehub★ 86ksame name
- penpot/penpot★ 62ksame name
- meteor/meteor★ 45ksame name
- iOfficeAI/AionUi★ 34ksame name
- garrytan/gbrain★ 33ksame name
- OpenZeppelin/openzeppelin-contracts★ 27ksame name
- tursodatabase/turso★ 25ksame name
- redis/go-redis★ 22ksame name
184 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- add-apiSkill
- buildSkill
- cpp-codingSkill
- file-creationSkill
- pr-createSkill
- pr-reviewSkill
- pytest-infraSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 1 is distinctive, and 7 are very specific to this project.
0
Common
Most of the 175 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Python 3: must be available
- Very specific: line 26
No legacy test-*.py scripts remain, and run-unit-tests.py never collects pytest-*.py.
- Very specific: line 91
Use -r / --regex to run tests whose names match a regular expression:
- Very specific: line 106
Use --skip-regex to exclude tests whose names match:
- Very specific: line 114
Use -t / --tag to run tests with a specific tag.
- Very specific: line 127
Run tests only on a specific device (implies --live):
- Very specific: line 241
If tests fail due to missing pyrealsense2, ensure -DBUILD_PYTHON_BINDINGS=ON was set during the CMake configure step
- Very specific: line 243
Make sure you are running from the unit-tests/ directory
“Common” is measured: kept by at least 6 in 10 of the 175 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Running Tests in librealsense
Prerequisites
- Build with tests and Python bindings enabled:
cmake .. -DBUILD_UNIT_TESTS=ON -DBUILD_PYTHON_BINDINGS=ON cmake --build . --config Release - Python 3 must be available
- The
pyrealsense2Python module must be built (ensured by-DBUILD_PYTHON_BINDINGS=ON) - For live tests: an Intel RealSense device must be connected
Test Framework
Two frameworks, split by test language:
- C++ tests (
test-*.cpp) are orchestrated by the legacy runnerunit-tests/run-unit-tests.py. Keeping that runner for C++ testing is its only remaining purpose. - Python tests (
pytest-*.py) are pytest only. See thepytest-infraskill (.claude/skills/pytest-infra/SKILL.md). No legacytest-*.pyscripts remain, andrun-unit-tests.pynever collectspytest-*.py.
Either way, run from the unit-tests/ directory.
Test Categories
| Directory | Type | Description |
unit-tests/live/ | Live (C++ & Python) | Require a connected RealSense device |
unit-tests/sw-dev/ | Software | Software-device tests, no hardware needed |
unit-tests/dds/ | DDS | DDS-related tests (require BUILD_WITH_DDS=ON) |
unit-tests/algo/ | Algorithm | Algorithm-level unit tests |
unit-tests/post-processing/ | Post-processing | Post-processing filter tests |
unit-tests/syncer/ | Syncer | Frame synchronization tests |
unit-tests/3D/ | 3D | Projection and 3D-related tests |
unit-tests/log/ | Logging | Logging infrastructure tests |
unit-tests/types/ | Types | Type system tests |
Running the pytest Tests
cd unit-tests
python3 -m pytest -v # all collectable tests
python3 -m pytest -v live/frames # one directory
python3 -m pytest -v pytest-fw-update.py # one file
python3 -m pytest -v -k "hdr and not preset" # filter by test nameFlags are registered in conftest.py: --live, --not-live, --device, --exclude-device,
--context, --tag, --repeat, --reruns, --debug, --rslog, --test-dir, --device-map. Note that -s
disables the per-test log files. See the pytest-infra skill (.claude/skills/pytest-infra/SKILL.md) for fixtures and markers.
Running the C++ Tests (legacy runner)
Navigate to the unit-tests/ directory and run:
cd unit-tests
python3 run-unit-tests.py -sThe -s flag directs test output to stdout. You can also specify the build output directory (required when both Debug and Release builds exist, to avoid ambiguity):
# When only one build configuration exists:
python3 run-unit-tests.py -s
# When both Debug and Release exist, specify the build output directory:
python3 run-unit-tests.py -s <build-output-dir>
# e.g., python3 run-unit-tests.py -s C:\work\git\librealsense\build\ReleaseFor full usage and all available flags:
python3 run-unit-tests.py --helpRunning Specific C++ Tests
The flags below belong to run-unit-tests.py, so they select among the C++ tests.
For pytest use -k, -m and the flags listed above.
By Name (Regex)
Use -r / --regex to run tests whose names match a regular expression:
python3 run-unit-tests.py -s -r "test-log-vs-LOG"
python3 run-unit-tests.py -s --regex "rsutils-string.*"Test name derivation: the orchestrator builds a test's name from its path relative to unit-tests/, replacing directory separators with - and stripping the leading test- from the filename. For example:
rsutils/string/test-hexarray.cppbecomestest-rsutils-string-hexarraylog/test-vs-LOG-shared.cppbecomestest-log-vs-LOG-shared
So when using -r, omit the test- filename prefix and join subdirectories with -.
Skip Tests by Name (Regex)
Use --skip-regex to exclude tests whose names match:
python3 run-unit-tests.py -s --skip-regex "test-rsutils-string-hexarray"By Tag
Use -t / --tag to run tests with a specific tag. Tags come from:
- File type:
exe(C++ binaries). Thepytag matches nothing now that no legacytest-*.pyremain. - Directory location: e.g., tests in
unit-tests/live/get thelivetag - An explicit
//#test:tag <name>directive in the source file
python3 run-unit-tests.py -s -t live # run only live tests
python3 run-unit-tests.py -s -t exe # run only compiled C++ tests
python3 run-unit-tests.py -s -t live -t exe # run tests that have BOTH tagsBy Device
Run tests only on a specific device (implies --live):
python3 run-unit-tests.py -s --device "D435"
python3 run-unit-tests.py -s --device "D455"
python3 run-unit-tests.py -s --exclude-device "D405"Live vs Non-Live
python3 run-unit-tests.py -s --live # only tests requiring hardware
python3 run-unit-tests.py -s --not-live # only tests that don't need hardwareListing Available Tests and Tags
# List all available tests
python3 run-unit-tests.py --list-tests
# List all available tags
python3 run-unit-tests.py --list-tags
# List tests with their tags
python3 run-unit-tests.py --list-tests --list-tagsOutput Control
python3 run-unit-tests.py -s # direct output to stdout (not log files)
python3 run-unit-tests.py -v # verbose — dump log on errors
python3 run-unit-tests.py -q # quiet — rely on exit status only
python3 run-unit-tests.py --rslog # enable LibRS debug logging in tests
python3 run-unit-tests.py --debug # enable framework debug output; also prints "test took X seconds" per testRunning Nightly-Only and Weekly Tests
Both runners take --context, which accepts a space-separated list.
pytest tests gated with @pytest.mark.context("nightly") are skipped unless the context is passed:
python3 -m pytest -v live/hw-reset/pytest-stress.py --context nightlyA test that also scales its iteration count or timeout for weekly runs reads the context through the
test_context_var fixture, so pass both words to get nightly collection plus weekly behaviour:
python3 -m pytest -v live/hw-reset/pytest-stress.py --context "nightly weekly"C++ tests use a //#test:donotrun:<context> directive in the source file, evaluated by
run-unit-tests.py against the same --context list.
Repeating and Retrying
python3 run-unit-tests.py --repeat 3 # repeat each test 3 times
python3 run-unit-tests.py --retry 2 # retry failed tests up to 2 times
python3 -m pytest --repeat 3 # pytest: repeat each file's tests 3 times
python3 -m pytest --reruns 2 # pytest: retry a failed test up to 2 timesRecording and Playback (Mock Hardware)
Tests can be recorded and replayed without a physical device:
# Record test execution to a file
./live-test into <filename>
# Replay tests from recorded data (no hardware needed)
./live-test from <filename>This is useful for:
- Debugging without a device
- Distinguishing hardware issues from software bugs
- Running tests in CI without physical cameras
CMake-Level Test Configuration
The UNIT_TESTS_ARGS CMake variable passes arguments to unit-test-config.py during configuration:
cmake .. -DBUILD_UNIT_TESTS=ON -DUNIT_TESTS_ARGS="-t live -r rsutils-string.*"Using a Custom Test Directory
python3 run-unit-tests.py --test-dir /path/to/custom/testsCustom Firmware for Testing
The SDK no longer ships a bundled firmware blob, so pytest-fw-update requires a custom firmware path for the device under test. Without one it skips. Download a signed .bin from https://dev.realsenseai.com/docs/firmware-updates, then:
python3 -m pytest pytest-fw-update.py --custom-fw-d400 /path/to/firmware.bin
python3 -m pytest pytest-fw-update.py --custom-fw-d555 /path/to/firmware.bin
python3 -m pytest pytest-fw-update.py --custom-fw-d585 /path/to/firmware.bin--custom-fw-d585 targets the non-safety D585 only (e.g. "D585 Prototype"). The safety SKU is kept
out of the test by pytest.mark.device_exclude("D585S"), so it is never collected and never flashed.
Troubleshooting
- If tests fail due to missing
pyrealsense2, ensure-DBUILD_PYTHON_BINDINGS=ONwas set during the CMake configure step BUILD_EASYLOGGINGPPmust beON(default) for unit tests to work- Make sure you are running from the
unit-tests/directory - For live tests, make sure the RealSense device is connected and accessible (on Linux, udev rules may need to be installed)
- On Linux, you may need to run with appropriate permissions or install udev rules from
config/
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

