SuperAPI AI Directory

oh-xts-build-run

Coding & development

View repository

Updated 10-16 07:28

About this skill

OpenHarmony XTS Compile and Run

This Skill combines XTS compilation (/oh-xts-build) and running (/oh-xts-run) into a complete workflow.

Workflow

  1. Execute compilation: run /oh-xts-build

    • Update List.test.ets to register test cases
    • Use hvigorw to compile and generate the HAP file
    • Check whether the main HAP and test HAP are generated successfully
  2. Determine the result:

    • If compilation fails → stop the process and return the compilation error
    • If compilation succeeds → continue to execute running
  3. Execute running: run /oh-xts-run [参数]

    • Automatically parse the package name (from pack.info or module.json5)
    • Run the test and parse the result statistics
  1. Summarize results: uniformly display the complete output of compilation and running

Parameters

  • --package=<package-name>: specify the package name (optional)
  • --api=<api-name>: specify the test class name (optional)

Implementation location

  • Compile command:packages/cli/src/ui/commands/ohXtsBuildCommand.ts
  • Run command:packages/cli/src/ui/commands/ohXtsRunCommand.ts
  • Core module:packages/cli/src/modules/xts/build-runner.ts