The script is used by the cpp test profiles. When QpidTestCase is using
an external broker it will check the exit status of the broker after
each test. If the broker exits with a non-zero status (i.e. it core
dumps), QpidTestCase will check the broker.clean system property and
exec it if present. This prevents a single broker crash from causing all
subsequent tests to fail.
As far as I can see there is no need to make this cross-platform until
the cpp broker is also cross-platform. I think it would be a mistake to
hard-code this behavior into QpidTestCase as that would make
QpidTestCase less capable of running against external brokers other than
our own. If a pure Java solution is required then we probably need to
develop some sort of broker control interface that the test framework
can use to start, stop, and clean up after external brokers.
--Rafael
Martin Ritchie wrote:
On 05/05/2008, Senaka Fernando <[EMAIL PROTECTED]> wrote:
Hi Martin,
What is this script used for? For sure it can't have something to do with
version controlled directories as it doesn't respect svn stuff. Thus, it
seems to be something like, a just for convenience script isn't it? Rhs
committed this saying,
"modified test harness to clean up data dir when broker crashes". Can't we
do the need-full without this script?
Ex:- export DIR_CLEAN_TEMP=xargs; rm -rf $DIR_CLEAN_TEMP; mkdir
$DIR_CLEAN_TEMP; export DIR_CLEAN_TEMP=
That too would work. I don't know what it is used for but imagine it
is for cleaning up a directory used to store persistent data used by
the C++ broker plug-in. I have a patch that will move the 'rm -rf'
into the java code but perhaps it is best done in the environment as
suggested above.
Would just be nice to tidy up the java root dir.
Regards,
Senaka
On Mon, May 5, 2008 at 5:45 PM, Martin Ritchie <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Would java user mind if I replaced the clean-dir script with a cross
> platform solution of doing the rm -rf $1 && mkdir $1 in java.
>
> Is there ever going to be any desire to do more than just rm && mkdir?
>
> If we do want to keep the script then I would love to see it stored
> somewhere out of the root directory of the project.
>
> Cheers
>
> Martin
>
> --
> Martin Ritchie
>