Hi all,
I have been looking a bit into producing installable (RPM,
DEB and sources for starters) packages for the PCP tests.
The goals are:
- simplify use in automated testing scenarios (esp. with
many hosts and with non-pcp-developers testing);
- better identify the PCP tree that the tests are expected
to work with;
- reuse existing packaging scripts/makefiles/configure goo
wherever possible rather than creating new variants;
- ensure developers know where new tests should reside (so
IMO, having the tests separate to the source package and
git tree is suboptimal).
There are several issues around potential changes to the
location of the tests themselves to aid this effort, and
its not clear on an ideal solution. In discussing this,
I propose that we ignore the historical baggage around
some of the (original) tests not being available outside
SGI, from IRIX/closed-PCP land, and we just focus on the
ideal long-term solution for open source PCP.
The current situation is:
- A pcpqa.git tree exists containing all of the core PCP QA
tests. On the surface it has loose association with any
PCP release, and there's a mechanism allowing it to work
for different PCP versions. However, I've found several
of the tests to have *deep* knowledge of internals of PCP,
and they can break in non-intuitive ways when the planets
are not aligned.
- Ken did some initial work on the pcpqa tree a couple of
months back & it can now be made produces a .deb package.
- The pcp-gui.git tree has pmchart, libqmc and pmdumptext
tests. There is no packaging done for these yet.
This situation is largely for historical reasons; originally
pcpqa was part of the pcp source tree (in pcp/qa, as it is
in the pcp-gui tree) and thats how I'd prefer to see it end
up once again.
I'm proposing the following:
- Merge pcpqa back into the core pcp tree, in the qa subdir
(where it historically lived).
- Produce an additional package from each Makepkgs (or distro
spec files) which can install the test scripts, binaries,
archives, etc into a suitable location and also create a
pcpqa user automatically if none exists.
If that's generally accepted as a step forward, then there
seem to be three options for merging pcpqa back to pcp/qa
and producing extra packages from the build:
- use a git submodule
https://git.wiki.kernel.org/index.php/GitSubmoduleTutorial
- use a git subtree merge
http://nuclearsquid.com/writings/subtree-merging-and-you/
- ditch the history, just copy everything over and commit,
resetting the clock on all qa tests.
I vastly favour the second option for simplicity - I'd like
to end up with one pcp tree again at the end, and have the
same model for both pcp and pcp-gui. The submodule approach
seemed good at first, but theres extra commands for all devs
to use which makes it seem just a bit too fiddly for me. If
there's noone who perceives value in keeping the history we
have (I'm not overly fussed) option 3 is quickest. :-)
As an example of other projects doing similar things - refer
to samba4, puppet, and mysql which all produce a -testsuite
package as part of their regular Debian distro builds. In
Fedora, there's systemtap as well doing similar things, and
others.
Thoughts? Thanks for reading this far!
cheers.
--
Nathan
|