更快速地调试 teuthology 工作单元
loic
Ceph 的 集成测试 通过 teuthology 运行,依赖于 Ceph 仓库中的 工作单元。例如
- 修改了 /cephtool/test.sh 工作单元
- 将其推送到官方 Ceph git 仓库中的一个 wip- 分支
- gitbuilder 将自动为所有支持的发行版构建此 wip- 分支的软件包
- 可以使用 teuthology-suite –suite rados/singleton 运行 rados/singleton/all/cephtool 套件
- workunit 任务 从 Ceph git 仓库获取工作单元目录并运行它
每次修改工作单元脚本都不需要重新打包 Ceph。相反,它可以从一个拉取请求中获取
修改了 cephtool/test.sh 工作单元
创建或更新了包含修改后的工作单元的 拉取请求 2043
创建了包含以下内容的 workunit.yaml 文件
overrides: workunit: branch: refs/pull/2043/head
可以使用 teuthology-suite –suite rados/singleton $(pwd)/workunit.yaml 运行 rados/singleton/all/cephtool 套件
workunit 任务 从 Ceph git 仓库获取分支 refs/pull/2043/head 中的工作单元目录并运行它
对于每个拉取请求,github 会隐式地在 目标 git 仓库 中创建一个引用。此引用被镜像到 git.ceph.com,workunit 任务可以从中提取它。teuthology-suite 命令接受 yaml 文件作为参数,并假定它们是 ceph-qa-suite 仓库克隆的根目录的相对路径。通过提供绝对路径 ($(pwd)/workunit.yaml),文件将从当前目录读取,而无需将其提交到 ceph-qa-suite 仓库。