‹ 首页

testing-debugging

@beriberikix · 收录于 昨天 · 上游提交 2 个月前

Testing and debugging for Zephyr RTOS. Covers the Ztest framework for unit and integration tests, the Twister test runner for automated HIL/SIM validation, and advanced tracing/debugging techniques (SystemView, Thread Analyzer, Stack analysis). Trigger when writing unit tests, setting up CI/CD pipelines, or analyzing system performance and latency.

适合你,如果是 Zephyr RTOS 开发者,需要编写和运行测试

/ 通过 npx 安装 校验哈希
npx oh-my-skill add beriberikix/zephyr-agent-skills/testing-debugging
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- beriberikix/zephyr-agent-skills/testing-debugging
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify beriberikix/zephyr-agent-skills/testing-debugging
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
58GitHub stars
~575最小装载
~2.4K含声明引用
~2.5K文本包总量
索引托管

怎么用

商店整理自技能原文 · 版本 ed63cdf · 表述以原文为准
它做什么

Claude 会提供 Zephyr RTOS 的测试与调试支持,包括使用 Ztest 框架编写单元/集成测试、用 Twister 运行自动化测试(硬件在环/仿真),以及通过 SystemView、Thread Analyzer 等工具进行系统性能分析和调试。

什么时候触发

当你编写单元测试、设置 CI/CD 流水线或分析系统性能与延迟时触发。

装好后可以这样说
Claude 会生成测试代码框架。
Claude 会解释配置方法。
Claude 会指导如何启用和查看跟踪。
技能原文 SKILL.md作者撰写 · Apache-2.0 · ed63cdf

Zephyr Testing & Debugging

Ensure code quality and system reliability using Zephyr's comprehensive testing framework and observability tools.

Core Workflows
1. Ztest Framework

Write robust unit and integration tests for native simulation and real hardware.

  • Reference: [ztest_framework.md](references/ztest_framework.md)
  • Key Tools: ZTEST_SUITE, ZTEST, zassert_equal.
2. Twister Test Runner

Automate test execution across multiple platforms and generate professional reports.

  • Reference: [twister_testing.md](references/twister_testing.md)
  • Key Tools: twister script, testcase.yaml, hardware mapping.
3. Tracing & Debugging

Analyze system behavior, timing, and memory usage with advanced tracing tools.

  • Reference: [tracing_debugging.md](references/tracing_debugging.md)
  • Key Tools: CONFIG_TRACING, Segger SystemView, Thread Analyzer.
Quick Start (Ztest)
#include <zephyr/ztest.h>

ZTEST_SUITE(basic_test, NULL, NULL, NULL, NULL, NULL);

ZTEST(basic_test, test_pass) {
    zassert_true(true, "Boolean evaluation failed");
}
Professional Patterns (Reliability)
  • Continuous Integration: Integrate Twister reports (twister.json) into CI/CD pipelines for automated regression testing.
  • HIL Validation: Use hardware maps to consistently run critical hardware tests on real devices during every release cycle.
  • Stack Safety: Always enable CONFIG_STACK_SENTINEL and the Thread Analyzer during development to catch memory issues early.
Automation Tools
  • [twister_smoke.py](scripts/twister_smoke.py): Run a small Twister suite and print result summary.
Examples & Templates
  • [testcase.yaml.template](assets/testcase.yaml.template): Starter testcase metadata for Twister.
Validation Checklist
  • [ ] twister executes selected test suites with no unexpected failures.
  • [ ] At least one ZTEST suite runs in simulation and reports pass/fail correctly.
  • [ ] Tracing or thread-analyzer output is captured and reviewed for hotspots.
  • [ ] CI artifacts include machine-readable reports (for example twister.json).
Resources
  • [References](references/):
  • ztest_framework.md: Writing tests with expectations and suites.
  • twister_testing.md: Using the test runner and metadata.
  • tracing_debugging.md: Tracing, stack analysis, and debugging backends.
  • [Scripts](scripts/):
  • twister_smoke.py: Lightweight Twister runner with summary output.
  • [Assets](assets/):
  • testcase.yaml.template: Reusable testcase metadata template.
按 Apache-2.0 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。