同步操作将从 ConfidentialComputing/nova-23.2.2 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
nova.db
imports are not allowed in nova/virt/*
oslo.db.sqlalchemy.session
nova/conf/
nova/policies/
(not_a_tuple)
because you meant (a_tuple_of_one,)
.For every new feature, unit tests should be created that both test and (implicitly) document the usage of said feature. If submitting a patch for a bug that had no unit test, a new passing unit test should be added. If a submitted bug fix does have a unit test, be sure to add a new one that fails without the patch and passes with the patch.
For more information on creating unit tests and utilizing the testing
infrastructure in OpenStack Nova, please read nova/tests/unit/README.rst
.
The testing system is based on a combination of tox and stestr. The canonical
approach to running tests is to simply run the command tox
. This will
create virtual environments, populate them with dependencies and run all of
the tests that OpenStack CI systems run. Behind the scenes, tox is running
stestr run
, but is set up such that you can supply any additional
stestr arguments that are needed to tox. For example, you can run:
tox -- --analyze-isolation
to cause tox to tell stestr to add
--analyze-isolation to its argument list.
Python packages may also have dependencies that are outside of tox's ability to install. Please refer to Development Quickstart for a list of those packages on Ubuntu, Fedora and Mac OS X.
To run a single or restricted set of tests, pass a regex that matches
the class name containing the tests as an extra tox
argument;
e.g. tox -- TestWSGIServer
(note the double-hypen) will test all
WSGI server tests from nova/tests/unit/test_wsgi.py
; --
TestWSGIServer.test_uri_length_limit
would run just that test, and
-- TestWSGIServer|TestWSGIServerWithSSL
would run tests from both
classes.
It is also possible to run the tests inside of a virtual environment
you have created, or it is possible that you have all of the dependencies
installed locally already. In this case, you can interact with the stestr
command directly. Running stestr run
will run the entire test suite.
stestr run --concurrency=1
will run tests serially (by default, stestr runs
tests in parallel). More information about stestr can be found at:
http://stestr.readthedocs.io/
Since when testing locally, running the entire test suite on a regular
basis is prohibitively expensive, the tools/run-tests-for-diff.sh
script is provided as a convenient way to run selected tests using
output from git diff
. For example, this allows running only the
test files changed/added in the working tree:
tools/run-tests-for-diff.sh
However since it passes its arguments directly to git diff
, tests
can be selected in lots of other interesting ways, e.g. it can run all
tests affected by a single commit at the tip of a given branch:
tools/run-tests-for-diff.sh mybranch^!
or all those affected by a range of commits, e.g. a branch containing a whole patch series for a blueprint:
tools/run-tests-for-diff.sh gerrit/master..bp/my-blueprint
It supports the same -HEAD
invocation syntax as flake8wrap.sh
(as used by the fast8
tox environment):
tools/run-tests-for-diff.sh -HEAD
By default tests log at INFO
level. It is possible to make them
log at DEBUG
level by exporting the OS_DEBUG
environment
variable to True
.
Normal Sphinx docs can be built via the setuptools build_sphinx
command. To
do this via tox
, simply run tox -e docs
,
which will cause a virtualenv with all of the needed dependencies to be
created and then inside of the virtualenv, the docs will be created and
put into doc/build/html.
If you'd like a PDF of the documentation, you'll need LaTeX and ImageMagick installed, and additionally some fonts. On Ubuntu systems, you can get what you need with:
apt-get install texlive-full imagemagick
Then you can use the build_latex_pdf.sh
script in tools/ to take care
of both the sphinx latex generation and the latex compilation. For example:
tools/build_latex_pdf.sh
The script must be run from the root of the Nova repository and it'll copy the output pdf to Nova.pdf in that directory.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。