##clone并安装tempest
cd /opt/stack
git clone https://review.opendev.org/openstack/tempest
cd /opt/stack/tempest
pip install .
cd ../
##clone 并安装cyborg-tempest-plugin
git clone https://review.opendev.org/openstack/cyborg-tempest-plugin
cd /opt/stack/cyborg-tempest-plugin
pip install .
##检查tempest是否安装成功,列出当前环境上已经安装的tempest插件
tempest list-plugin
root@ubuntu-OpenStack:/opt/stack/cyborg-tempest-plugin# tempest list-plugin
+-------------------------------+-----------------------------------------------------------------------------------------+
| Name | EntryPoint |
+-------------------------------+-----------------------------------------------------------------------------------------+
| manila_tests | manila_tempest_tests.plugin:ManilaTempestPlugin |
| cyborg_tempest_plugin | cyborg_tempest_plugin.plugin:CyborgTempestPlugin |
+-------------------------------+----------------------------------------------------------------------------------------+
##配置cyborg-tempest-plugin
##在devstack上直接执行cyborg-tempest-plugin的某个测试
cd /opt/stack/tempest/
sudo tempest run --regex cyborg_tempest_plugin.tests.scenario.test_accelerator_basic_ops.TestServerBasicOps.test_server_basic_ops (测试的路径+名字)
##虚拟环境中执行tempest测试
Source .tox/tempest/bin/activate
Tox -e all-plugin -- cyborg_tempest_plugin
Tox -e all-plugin -- cyborg_tempest_plugin.tests.scenario.test_accelerator_basic_ops.TestServerBasicOps.test_server_basic_ops