oh-xts-build-run
OpenHarmony XTS 编译和运行
此 Skill 将 XTS 编译 (/oh-xts-build) 和运行 (/oh-xts-run) 组合成一个完整的工作流。
工作流程
-
执行编译:运行
/oh-xts-build- 更新 List.test.ets 注册测试用例
- 使用 hvigorw 编译生成 HAP 文件
- 检查主 HAP 和测试 HAP 是否生成成功
-
判断结果:
- 如果编译失败 → 停止流程,返回编译错误
- 如果编译成功 → 继续执行运行
-
执行运行:运行
/oh-xts-run [参数]- 自动解析包名(从 pack.info 或 module.json5)
- 运行测试并解析结果统计
-
汇总结果:统一展示编译和运行的完整输出
参数
--package=<package-name>:指定包名(可选)--api=<api-name>:指定测试类名(可选)
实现位置
- 编译命令:
packages/cli/src/ui/commands/ohXtsBuildCommand.ts - 运行命令:
packages/cli/src/ui/commands/ohXtsRunCommand.ts - 核心模块:
packages/cli/src/modules/xts/build-runner.ts
More from openharmonyinsight/openharmony-skills
openharmony-cpp
Expert coding guide for OpenHarmony C++ development. Use this skill when writing, refactoring, or reviewing C++ code for OpenHarmony projects. It enforces strict project-specific conventions (naming, formatting, headers) and critical security requirements (input validation, memory safety).
77openharmony-security-review
Use when reviewing OpenHarmony C++ system service code for security vulnerabilities, particularly IPC handlers, multithreaded components, or code handling sensitive user data
77oh-ut-generator
|
65cpp-core-guidelines-review
Parallel C++ Core Guidelines code review using multiple specialized sub-agents. Use when reviewing C++ code, modules, or files against C++ Core Guidelines to identify violations. Each sub-agent reviews against a specific guideline section (Functions, Classes, Resource Management, etc.) and outputs findings to separate markdown files in the review/ directory, followed by a consolidated summary.
59ohos-chromium-security-review
|
55openharmony-build
This skill should be used when the user asks to "编译 OpenHarmony", "build OpenHarmony", "编译完整代码", "执行编译", "编译 OpenHarmony 代码", "快速编译", "跳过gn编译", "fast-build", "编译测试", "编译测试用例", "build ace_engine_test", "编译 sdk", "编译 SDK", "build sdk", "build SDK", "编译 ohos-sdk", "编译测试列表", "build test list", "按列表编译测试", "编译指定测试", or mentions building the full OpenHarmony system, fast rebuild, test compilation, SDK compilation, or building tests from a target list. Handles complete build process including build execution, success verification, and failure log analysis with primary focus on out/{product}/build.log.
55