Re: pear Jenkins
| From: | Daniel O'Connor | Date: | Wed, 28 Mar 2012 06:06:01 +0000 |
| Subject: | Re: pear Jenkins | ||
| References: | 1 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-6064@lists.php.net to get a copy of this message | ||
Hi Jan,
Some of the failing PEAR jobs on the Jenkins seem to suffer from
> minute bugs that may be easy to fix.
>
> Undoubtedly the case. What you'll often see is people like myself doing
things from approximately 10,000ft.
> Like HTML_Entities[1] or Auth seems to fail to include main workspace
> directory in the include_path.
> or are the errors caused by file not being in places described by the
> package XML?
>
> To give you a bit of history - PEAR lived in the php.net CVS site for
some time.
Back in 2003, you'd edit a package.xml file and set a baseinstall directory
- unit tests weren't really common. If you installed the package, then you
could run the tests - so it mostly sort of worked.
Also, if you made the directory structure wrongly in CVS; there wasn't
great support for copy/preserve history - all of a sudden you lose all of
the benefits of version control if you go around changing things; so it's
better not to.
At a later point, we shifted to SVN. It was trivial to rename things, but
also Zend Framework and others had appeared - developers started to leave
the project.
You can see this on http://www.ohloh.net/p/pear where
'cvs2svn' leaves the
project.
Our first CI attempt was done then - a quick script to check out all trunk
packages and run either
$ phpunit tests/AllTests.php
or
$ pear run-tests -r tests/
We tried a few other things (cruise control); and have landed on jenkins as
the way we manage things.
A lot of the tests are set up via scripts. We've got 400+ packages, so
adding them all to CI is something best automated; but as you can see you
lose a bit of the human touch.
Is there a way I could help? Is "fork and pull" on github the
> preferred way of help/discussion?
>
Absolutely, if the package is on github just a quick
$ pear install PEAR_PackageFileManager_Cli
$
$ git clone ...
$ cd Foo_Bar
$ git mv Bar.php Foo/
$ git mv Bar Foo/
# Regenerate package
$ pfm
# Run tests - either:
$ phpunit tests/
... or
$ ant
$ git commit -m "Wheee"
$ git push
+ pull request is much appreciated.
You will also find though a number of packages that still live in SVN.
> What help would be most appreciated?
> Can the Jenkins server have a tab just with failing Jobs like "All
> Failed" on http://ci.jenkins-ci.org/ ?
>
> That's provided by the
https://wiki.jenkins-ci.org/display/JENKINS/View+Job+Filters
plugin, which
I don't yet have installed. Will have a look.
> Thanks
> Jan
>
>
> [1]
> +Fatal error: require_once(): Failed opening required
> 'HTML/Entities.php' (include_path='.:/usr/local/lib/php/pear') in
> /var/lib/jenkins/workspace/HTML_Entities/tests/html_entities1.php on
> line 2
>