This repository has been archived by the owner on Mar 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
HACKING
37 lines (26 loc) · 1.52 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
HACKING
-------
virtinst is tied closely with libvirt, so it's recommended to try and run
the latest libvirt code if using virtinst from an upstream checkout. See
http://libvirt.org/downloads.html
Please be aware that virtinst is an API. The public classes are marked as
such in virtinst/__init__.py: please be mindful of this when writing patches.
Anything else in the codebase can be editted at will.
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
python setup.py test_urls : Test our install media fetching infrastructure
python setup.py test_cli : Test various CLI invocations
Any patches shouldn't change the output of 'test' or 'pylint'. Check
requires pyling 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 'test'
to see a code coverage report.
'test_urls' only needs to be run if the patch is against the url fetching
code (virtinst/OSDistro.py). This stuff is notoriously fragile, so running
'test_urls' is a must. If you are debugging a certain url failure, you can
use the --match option to specify specific distros to test.
'test*' have a --debug option if you are hitting problems.