On 04/27/2012 12:16 PM, Denis Gervalle wrote:
Hi devs,
Following the numerous database related issues that have/are delayed/ing
the 3.5.1 release and the 4.0 release, and seing how it could be long and
annoying to put multi-database tests in place, and the hard work Sorin has
done in testing these issues again and again, I have taken a couple of hour
to write a decent bash script.
Here is an excerpt of the usage message of my script:
This script can do the following steps easily to help you testing xwiki
distribution:
- Download a distribution package, either release or snapshot (using
mysql/jetty distribution).
- Deploy that package, and configure it for a requested database.
- Create the needed database.
- Import a database dump, previously exported with this same tool.
- Launch the configured XWiki with Jetty.
- Backup the database after XWiki shutdown.
All operations could be done in a multiuser environment, using common
databases, without conflict.
You may start using it as easy as "xwiktest -v 3.5 -d oracle -w" to have a
XWiki release 3.5 downloaded and run with oracle and non-conflicting ports
and database.
Full options are listed at the end of this thread for the interested.
I really hope this script could help in testing more often any changes that
may have consequences between versions, or may cause incompatibilities with
some databases. It would be nice if a well connected VM (the one from Sorin
has all DBs well configured but is badly connected and downloading is
really slow :( ) could be available to all committers, avoiding each one to
have to setup each database locally.
If you find it useful, I will maintain this script as much as possible, and
improve it further. I have already some idea like:
- automatically import a given XAR
- check logs, terminate and report issue automatically (to integrate with
Jenkins?)
- allow starting multiple version one after each others, testing migration
in one run
...
This is already more than a simple script (~500 lines), and well documented.
However, I do not found a good place to put such script in GitHub. IMO,
this script is like release scripts, it will be maintained by the dev team,
and it could became essentiel to the project, and I have conform as much as
a bash script could to our coding practices. Therefore I do not think that
putting it in xwiki-contrib is right. Release scripts should not even be
there, and need a place in a xwiki repositories IMO.
These are scripts that are never released nor compile or what ever. We have
already something similar in xwiki repositories: xwiki-debug-eclipse
I do not think it is nice to multiply repositories in xwiki, but there is a
need for unreleased but maintained codes like these.
I proposed that we create a new repository in XWiki to contains such codes,
and to put/move in it:
- xwiki-debug-eclipse
- xwiki-release-tools (for release scripts)
- xwiki-testing-tools (for the above script)
We may call this repository:
- xwiki-tools
- xwiki-utils
- xwiki-dev-tools
...
WDYT ?
Very good initiative, thanks Denis.
I agree that xwiki-contrib isn't the perfect place for such tools, I put
the release scripts there while the code was still young and untested
except by me, and mostly because I didn't want to start the discussion
about where to put it.
I'd say that my number 1 preference is for xwiki-dev-tools, since
they're about developing on XWiki itself.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/