2013-04-04 06:41:32 +08:00
|
|
|
HACKING
|
|
|
|
=======
|
2009-06-18 22:53:09 +08:00
|
|
|
|
|
|
|
We use glade-3 for building virt-manager's UI. It is recommended you have
|
|
|
|
a fairly recent version of glade-3: if a small UI change seems to rewrite the
|
|
|
|
entire glade file, you likely have a too old (or too new :) glade version.
|
|
|
|
|
2013-04-04 06:41:32 +08:00
|
|
|
The following commands will be useful for anyone writing patches:
|
|
|
|
|
|
|
|
python setup.py test : Run local unit test suite
|
|
|
|
python setup.py pylint : Run a pylint script against the codebase
|
|
|
|
|
2013-04-16 01:22:19 +08:00
|
|
|
Any patches shouldn't change the output of 'test' or 'pylint'. The
|
|
|
|
'pylint' requires pylint and python-pep8 to be installed.
|
2013-04-04 06:41:32 +08:00
|
|
|
|
|
|
|
Our pylint script uses a blacklist rather than a whitelist approach,
|
|
|
|
so it could throw some false positives or useless messages. If you think
|
|
|
|
your patch exposes one of these, bring it up on the mailing list.
|
|
|
|
|
|
|
|
If 'python-coverage' is installed, you can run 'coverage -r' after 'test'
|
|
|
|
to see a code coverage report.
|
|
|
|
|
|
|
|
'test*' have a --debug option if you are hitting problems.
|
2013-04-16 01:22:19 +08:00
|
|
|
|
2013-04-22 01:12:08 +08:00
|
|
|
One useful way to manually test virt-manager's UI is using libvirt's
|
|
|
|
unit test driver. From the source directory, Launch virt-manager like:
|
|
|
|
|
2013-09-29 02:42:37 +08:00
|
|
|
virt-manager --connect test://$PWD/tests/testdriver.xml
|
2013-04-22 01:12:08 +08:00
|
|
|
|
|
|
|
This testdriver has many fake XML definitions that can be used to see
|
|
|
|
each bit of virt-manager's UI. It also enables testing the various wizards
|
|
|
|
without having to alter your host virt config.
|
2013-04-16 02:04:25 +08:00
|
|
|
|
2013-09-29 02:42:37 +08:00
|
|
|
Also, there's a few standalone specialty tests:
|
|
|
|
|
|
|
|
python setup.py test_urls : Test fetching media from distro URLs
|
|
|
|
python setup.py test_initrd_inject: Test --initrd-inject
|
|
|
|
|
2013-04-16 02:04:25 +08:00
|
|
|
|
|
|
|
Submitting patches
|
|
|
|
==================
|
|
|
|
|
|
|
|
Patches should be developed against a git checkout and _not_ a source
|
|
|
|
release. The git repo is at
|
|
|
|
|
|
|
|
git://git.fedorahosted.org/git/virt-manager.git
|
|
|
|
|
|
|
|
For an web view, see:
|
|
|
|
|
|
|
|
https://git.fedorahosted.org/cgit/virt-manager.git/
|
|
|
|
|
|
|
|
Patches should be sent to the mailing list (see README for details). Using
|
|
|
|
git format-patch/send-email is preferred, but an attachment with
|
|
|
|
format-patch output is fine too.
|
2013-04-22 01:12:08 +08:00
|
|
|
|
|
|
|
|
|
|
|
Translations
|
|
|
|
============
|
|
|
|
|
|
|
|
For translations, please sign up for transifex.com and contribute to the
|
|
|
|
virt-manager project.
|