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
More talk lately.about the whole repository
Most recently taken up by
- realsenseai/librealsenseword for word, first seen Nov 16, 2026
- 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
Who's talking about IntelRealSense/librealsense
- A Hacker News story“Best RealSense replacements?”Hacker News · Aug 18, 2021 · 96 points
- realsenseai/librealsense“`librealsense.intel.com` domain no longer resolves — installation instructions in `distribution_linux.md` …”GitHub · Nov 11, 2025 · 20 reactions
- conan-io/conan-center-index“[request] some of most relevant c++ libraries in github (by number of stars)”GitHub · Jan 8, 2020 · 16 reactions
- realsenseai/librealsense“I have written a set of instructions to install librealsense and pyrealsense2 on the Jetson NX”GitHub · Nov 5, 2020 · 15 reactions
- realsenseai/librealsense“ uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).”GitHub · Nov 22, 2019 · 11 reactions
The biggest 5 of 81 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 81
Talked about on GitHub, Stack Overflow and Hacker News (81 times).
On GitHub · 48
- Nov 11, 2025`librealsense.intel.com` domain no longer resolves — installation instructions in `distribution_linux.md` fail on Ubuntu 22.04 — realsenseai/librealsense20 reactions · 8 comments
- Jan 8, 2020[request] some of most relevant c++ libraries in github (by number of stars) — conan-io/conan-center-index16 reactions · 132 comments
- Nov 5, 2020I have written a set of instructions to install librealsense and pyrealsense2 on the Jetson NX — realsenseai/librealsense15 reactions · 16 comments
- Nov 22, 2019 uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024). — realsenseai/librealsense11 reactions · 34 comments
- Nov 30, 2018Installation SDK on the Mac — realsenseai/librealsense11 reactions · 11 comments
43 more on GitHub
- Feb 10, 2020Official support for ROS2 — realsenseai/librealsense8 reactions · 25 comments
- May 26, 2021(Resolved) Apt server is broken/down, gives 403 Forbidden (May 2021) — realsenseai/librealsense7 reactions · 30 comments
- Feb 1, 2020T.265: My experience after about 3 months — realsenseai/librealsense7 reactions · 13 comments
- Jul 18, 2022Announcement: Engineering beta support for Ubuntu 22.04 / ROS2 Humble now available — realsenseai/librealsense6 reactions
- Nov 22, 2018Can not build SDK2.0 from source on MacOS Mojave — realsenseai/librealsense6 reactions · 17 comments
- Aug 25, 2021Prebuilt pyrealsense2 for macOS released — realsenseai/librealsense5 reactions · 8 comments
- Apr 1, 2021Implementation with D435 and T265 INTEL cameras for STEREO-INERTIAL — UZ-SLAMLab/ORB_SLAM35 reactions · 16 comments
- Apr 25, 2019Feature request: HDR mode — realsenseai/librealsense5 reactions · 42 comments
- Apr 8, 20182.10.3 patch-realsense-ubuntu-xenial.sh fails with — realsenseai/librealsense5 reactions · 14 comments
- Apr 4, 2019Get number of frames in bag file using pyrealsense2 — realsenseai/librealsense4 reactions · 12 comments
- Mar 7, 2019Release intel-realsense-dfu for bionic — realsenseai/librealsense4 reactions · 8 comments
- Feb 13, 2018Add RSSDK 2.0 (librealsense2) grabber — PointCloudLibrary/pcl4 reactions · 79 comments
- Jan 16, 2025Document how to use the device on WSL — robotology/yarp-device-realsense23 reactions · 6 comments
- Jan 30, 2023Avoid to call wait_for_frames in the get functions for the RealSense class — gbionics/bipedal-locomotion-framework3 reactions · 3 comments
- Mar 8, 2022Unreal Engine 4.27 support — realsenseai/librealsense3 reactions · 2 comments
- Aug 3, 2020add enable (SetBool) service for disabling/enabling sensor streams — realsenseai/realsense-ros2 reactions · 5 comments
- Jan 8, 2019fix nite2 support, fix intrinsics — realsenseai/librealsense2 reactions · 1 comment
- Nov 24, 2024Patch librealsense v2.44.0 to include `<chrono>` for `system_clock` — isl-org/Open3D1 reaction · 1 comment
- Feb 8, 2023librealsense2: Update to librealsense 2.53.1 — realsenseai/meta-intel-realsense1 reaction
- May 26, 2021Fix librealsense installation in CI — gbionics/bipedal-locomotion-framework1 reaction
- Dec 6, 2020Upgrade librealsense2 to 2.40.0 — bytedeco/javacpp-presets1 reaction
- Sep 19, 2018Add librealsense2 dependency to package.xml — realsenseai/realsense-ros1 reaction · 2 comments
- Jun 8, 2018videoio: update librealsense to API 2.0 — opencv/opencv1 reaction
- Feb 9, 2018Fix illegal RosBag keys by replacing spaces with underscores — realsenseai/librealsense1 reaction · 4 comments
- Oct 30, 2026docs: fix dead Isaac Teleop and RealSense links — huggingface/lerobot0 reactions · 1 comment
- May 31, 2026react-viewer: auto-detect device hot-plug via ctx callback — AviaAv/librealsense0 reactions · 1 comment
- May 20, 2026testing stuff — AviaAv/librealsensesays it tested it0 reactions · 7 comments
- Mar 20, 2026Added throttle of logs — MuLTechnologies/librealsense0 reactions
- Jul 22, 2025Add support to use system provided nlohmann_json library if requested — realsenseai/librealsense0 reactions · 7 comments
- Jul 22, 2025librealsense-gui: 2.56.3 -> 2.57.7 — NixOS/nixpkgs0 reactions · 8 comments
- Jul 9, 2025Improved support to build libraries in shared mode — realsenseai/librealsense0 reactions · 7 comments
- Jan 27, 2025Handle D430GMSL PID for fw update — gwen2018/librealsense0 reactions
- Feb 14, 2024Cant build with message Could NOT find PythonInterp (missing: PYTHON_… — realsenseai/librealsense0 reactions · 3 comments
- Nov 17, 2023Manual acquisitions — secomind/librealsense0 reactions
- Nov 17, 2023implement periodic acquisitions with thread — secomind/librealsense0 reactions
- Jun 17, 2023android-examples-recording-plus — realsenseai/librealsense0 reactions · 3 comments
- Apr 27, 2023Re-use device buffer in yuy2 cuda helper — realsenseai/librealsense0 reactions · 2 comments
- May 16, 2022Dispatcher deadlock workaround — realsenseai/librealsense0 reactions · 8 comments
- Apr 23, 2022PLY vertices data on a single line — realsenseai/librealsense0 reactions · 1 comment
- May 10, 2021Explicitly set OPENSSL_ROOT_DIR in libcurl build — realsenseai/librealsense0 reactions · 3 comments
- Feb 5, 2020Enable linear interpolate of Gyro and Accel data over IMU topic — intel/ros2_intel_realsense0 reactions · 1 comment
- Jan 24, 2020Publish messages using frame timestamp — intel/ros2_intel_realsense0 reactions · 1 comment
- Dec 5, 2019Add Dockerfile for reproducible builds — intel/ros2_intel_realsense0 reactions · 1 comment
On Stack Overflow · 30
- May 15, 2018error: Updating from such a repository can't be done securely, and is therefore disabled by default5 votes · 3 answers
- Nov 6, 2020RGB image captured by Intel realsense camera is dark (using python code)4 votes
- Oct 29, 2019Pointcloud and RGB Image alignment on RealSense ROS4 votes
- Jun 6, 2018Pyrealsense2 (Librealsense SDK 2.0): choose cam from Serial Number3 votes · 1 answer
- Mar 26, 2018Face landmark detection using Intel RealSense Compatiblity SDK3 votes
25 more on Stack Overflow
- Feb 14, 2018Windows Hello API3 votes
- Aug 5, 2020How to align already captured RGB and Depth images2 votes
- Nov 26, 2019Intel RealSense Depth Camera D435i noises and mounds2 votes · 1 answer
- Jan 13, 2019Machine Learning: Question regarding processing of RGBD streams and involved components2 votes
- Aug 22, 2018Error running RealSense D435 on Ubuntu 16.04(4.4.0-131-generic)2 votes
- May 17, 2018intel real sense sdk programming in vs20152 votes
- Jul 25, 2023Depth camera not calibrated when using from pyrealsense1 vote
- Sep 9, 2022Realsense D435 change resolution in MATLAB1 vote
- Oct 28, 2021How to install pyrealsense2 on Mac Os?1 vote
- Jul 9, 2021Realsense D435 change resolution in MATLAB1 vote · 2 answers
- Mar 5, 2021Translate Region of Interest from RGB video to Depth video using OpenCV1 vote
- Oct 6, 2020threshold depth distance in image opencvsharp c# intel realsense1 vote
- Dec 10, 2018RGB image with depth info1 vote
- Jul 5, 2018mapping depth image to color image with realsense2 about opencv1 vote · 2 answers
- Apr 2, 2023Advanced depth visualisation Intel Realsense camera in python0 votes
- Dec 4, 2022Cannot get intelrealsense to compile from source on a Raspi4 8GB0 votes
- Sep 7, 2022On Raspberry Pi 4 with Ubuntu 22.04 don't work ioctl0 votes
- Jun 21, 2022Intel realsense R200: Errors when running 'make'0 votes
- Oct 6, 2021Intel Realsense - unable to read bag file0 votes
- Jun 23, 2021Intel RealSense - Align depth and color in two numpy arrays0 votes
- Oct 8, 2020Display point cloud continuous c# Intel Realsense0 votes · 1 answer
- May 20, 2020Pointer Exception while getting RGB values from (video) frame Intel Realsense0 votes · 2 answers
- Mar 15, 2019Save WriteableBitmap C# WPF video stream to file0 votes
- Dec 12, 2018How to know the orientation angle of real Sense depth Camera?0 votes
- Nov 2, 2016Error while compiling librealsense in clion0 votes
On Hacker News · 3
- Aug 18, 2021Best RealSense replacements?96 points · 82 comments
- Jan 21, 2016RealSense open source library released by Intel for Linux OS X and Windows2 points
- Jan 22, 2016LibrealSense: Cross-platform camera capture from Intel1 point
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 · 1
- realsenseai/librealsense★ 9.1k100% same
Edited · 0
None found.
Wrote their own version · 193
- 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
183 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 174 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 174 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.

