Linux command
tmt-run 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Run
tmt run
Discover
tmt run discover -v
Example
tmt run -a provision -h [container] -i [fedora:rawhide]
Example
tmt run plan -n [/plan/name] test -n [/test/name]
Example
tmt run -l report -h html -o
Example
tmt run -c [key=value]
Example
tmt run -a execute -h tmt --interactive
Dry run
tmt run -n -vvv
说明
tmt run executes test management tool steps for test execution. By default, all steps (discover, provision, prepare, execute, report, finish) are executed in sequence. Individual steps can be run separately or with modified options. The command supports different provisioning methods including containers, virtual machines, and remote systems. Tests can be filtered by name, context, or plan.
参数
- -a, --all
- Run all test steps
- -l, --last
- Use the last run
- -n, --dry
- Dry run mode (show actions without executing)
- -v, --verbose
- Increase verbosity (can be repeated)
- -c, --context _KEY=VALUE_
- Set context variables
- discover
- Show what tests would be run
- provision
- Provision the guest (container, VM, or remote system) that will run the tests
- prepare
- Prepare the provisioned system for testing (install packages, apply roles)
- execute
- Run the tests
- report
- Generate test reports
- finish
- Clean up after testing
FAQ
What is the tmt-run command used for?
tmt run executes test management tool steps for test execution. By default, all steps (discover, provision, prepare, execute, report, finish) are executed in sequence. Individual steps can be run separately or with modified options. The command supports different provisioning methods including containers, virtual machines, and remote systems. Tests can be filtered by name, context, or plan.
How do I run a basic tmt-run example?
Run `tmt run` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -a, --all do in tmt-run?
Run all test steps