aboutsummaryrefslogtreecommitdiff
path: root/README
blob: ed474f755ddbac7223e072483c4f5f3037af32b2 (plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
PMS Test Suite
==============

A GSoC 2011 project by Michał Górny.

http://www.gentoo.org/proj/en/qa/pms/pms-test-suite.xml


Few words of introduction
-------------------------

The PMS Test Suite projects aims to create a comprehensive, universal test suite
for Gentoo Package Managers. It is supposed to create a set of test ebuilds, run
them using a particular Package Manager (like portage) and check their results
to determine whether the PM does comply to the PMS [1].

[1]:http://www.gentoo.org/proj/en/qa/pms.xml


D-Bus setup
-----------

Right now, the standard test library requires the system-wide D-Bus daemon to
be set up and running. The `setup.py` install script installs the necessary
configuration file along with the Python modules but one needs to start or
restart the daemon as required before running the test suite.

A future version will most probably drop D-Bus dependency and replace it with
a less painful IPC.


How to run it
-------------

First, you need to have an overlay for the tests. If you intend to use portage,
`pms-tester` can create an temporary repository and use it automatically. To do
so, run:

	pms-tester -R /tmp/your-repo-location

If you intend to test another PM, you need to either create the repository
yourself or use the above command to let `pms-tester` create it for you. Notice
you'll need to have portage installed for that. Afterwards, you need to add
the repository to your PM configuration.

For example, setting up a test repository for portage configs can be achieved
through:

	umask 022
	mkdir -p /usr/local/portage/pms-tests/profiles
	echo 'pms-test-suite' > /usr/local/portage/pms-tests/profiles/repo_name
	echo 'PORTDIR_OVERLAY="${PORTDIR_OVERLAY}
		/usr/local/portage/pms-tests' >> /etc/make.conf

The newly-created repository can be then referenced by name:

	pms-tester -r pms-test-suite -p yourpm

`pms-test-suite` is the default name, and pms-tester will use it when no `-r`
nor `-R` is specified. Thus, the above could be simplified to:

	pms-tester -p yourpm


Getting nice HTML results
-------------------------

By default, pms-tester simply runs all tests and returns information about test
failures. If you'd like to get a nice HTML output instead (like the one
published by me [1]), please use:

	pms-tester -p yourpm -o html -O myoutput.html

You can run the test suite using multiple PMs as well:

	pms-tester -p pkgcore -p portage -p paludis -o html -O myoutput.html

[1]:http://dev.gentoo.org/~mgorny/pms-test-suite-output.html

<!-- vim:se syn=markdown :-->