forked from virt-manager/virt-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HACKING
64 lines (41 loc) · 2.19 KB
/
HACKING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
HACKING
=======
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
Any patches shouldn't change the output of 'test' or 'pylint'. The
'pylint' requires pylint and python-pep8 to be installed.
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
'python setup.py test' finished to see a code coverage report.
'test*' have a --debug option if you are hitting problems.
For more options, use 'python setup.py test --help'.
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:
virt-manager --connect test://$PWD/tests/testdriver.xml
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.
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
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.
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 a 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.
Translations
============
For translations, please sign up for transifex.com and contribute to the
virt-manager project, see:
https://www.transifex.com/projects/p/virt-manager/