1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-01 19:35:24 +02:00

tmt, tmt-run, tmt-try: add Chinese translation (#14962)

The pages translated are from PR [14921][01].

[01]: https://github.com/tldr-pages/tldr/pull/14921

Signed-off-by: Huanian Li <idorax@126.com>
Co-authored-by: Wiktor Perskawiec <git@spageektti.cc>
This commit is contained in:
Huanian Li 2024-12-04 14:57:00 +08:00 committed by GitHub
parent e5305a1865
commit 70daf74a45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 109 additions and 0 deletions

36
pages.zh/linux/tmt-run.md Normal file
View file

@ -0,0 +1,36 @@
# tmt run
> 执行测试步骤。默认情况下,所有测试步骤都被执行。
> 更多信息:<https://tmt.readthedocs.io/en/stable/overview.html#run>.
- 在每一个计划中执行所有测试步骤:
`tmt run`
- 仅在发现步骤中显示将要执行的测试:
`tmt run discover -v`
- 运行所有测试步骤并调整测试环境配置步骤选项:
`tmt run --all provision --how {{container}} --image {{fedora:rawhide}}`
- 仅执行选定的计划和测试:
`tmt run plan --name {{/plan/name}} test --name {{/test/name}}`
- 在网页浏览器中显示上次运行的结果:
`tmt run --last report --how {{html}} --open`
- 在提供的上下文中运行测试:
`tmt run --context {{key=value}} -c {{distro=fedora}}`
- 以交互方式运行测试(在测试运行过程中调试测试代码):
`tmt run --all execute --how {{tmt}} --interactive`
- 使用干模式查看接下来将发生的动作,并将输出详实度设置为最高级:
`tmt run --dry -vvv`

36
pages.zh/linux/tmt-try.md Normal file
View file

@ -0,0 +1,36 @@
# tmt try
> 测试及环境快速上手。
> 更多信息:<https://tmt.readthedocs.io/en/stable/stories/cli.html#try>.
- 快速尝试默认的测试环境配置方法(当前工作目录中没有测试):
`tmt try`
- 在当前的工作目录中运行一个测试:
`cd {{path/to/test}} && tmt try`
- 使用特定的操作系统:
`tmt try {{fedora-41}}`
- 选择定制的镜像和测试环境配置方法:
`tmt try {{fedora@container}}`
- 根据定制的筛选条件选择测试:
`tmt try --test {{feature}}`
- 配置客户机并等待用户输入指令:
`tmt try --ask`
- 直接登录到客户机:
`tmt try --login`
- 显示帮助:
`tmt try --help`

37
pages.zh/linux/tmt.md Normal file
View file

@ -0,0 +1,37 @@
# tmt
> 创建、运行和调试测试的测试管理工具。
> 诸如`运行``尝试`等子命令,均有相应的用法文档。
> 更多信息:<https://tmt.readthedocs.io>.
- 列举可用的测试、计划和用户故事:
`tmt`
- 初始化测试管理工具的文件/项目结构:
`tmt init`
- 基于模板和链接创建新的测试:
`tmt test create --template {{beakerlib}} --link {{verifies:issue#1234}}`
- 列出可用的测试、计划和用户故事:
`tmt {{test|plan|story}} ls {{pattern}}`
- 在给定的上下文中显示详细的测试元数据:
`tmt --context {{arch=aarch64}} test show`
- 根据说明书验证测试管理工具文件的有效性:
`tmt lint`
- 使用筛选条件:
`tmt tests ls --filter {{tag:foo}} --filter {{tier:0}}`
- 显示帮助:
`tmt --help`