lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Make unattended tests more robust


From: Greg Chicares
Subject: Re: [lmi] Make unattended tests more robust
Date: Fri, 23 Jan 2015 15:42:02 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0

On 12/20/2014 02:54 PM, Vadim Zeitlin wrote:
> 
>  While debugging the tests and running into miscellaneous problems due to
> bugs in my own test code, I realized that the test was not really as
> unattended as it was intended to be, i.e. we could get an unexpected
> message box pop up during the test and in this case the operator
> intervention would be needed to let the test continue.
> 
>  As I think the goal is to make sure the test does run to the end
> completely unattended no matter what, the first patch (almost) ensures that
> this does happen by considering any unexpected dialog an automatic failure.

Applied 20150123T1526Z, revision 6098.

Whenever an unexpected dialog was displayed, I tended not to trust any
subsequent diagnostics in later tests, fearing that the unexpected dialog
could have caused them. Now I don't have to worry about that any more.

>  The "almost" part comes from the fact that the dialogs shown using
> wxSafeShowMessage() are not caught by the modal dialogs hooks and one such
> dialog is used in wx_test_new.hpp where I tried to detect the case where
> the test code forgot to call close() or close_discard_changes().
> Unfortunately the detection is not quite correct as it doesn't consider the
> case when the call to one of these functions is there in the code but is
> not executed because an exception is thrown before it is reached. So the
> second patch corrects this and avoids showing this dialog in such case.

Applied 20150123T1537Z, revision 6099.

I generally hesitate to use std::uncaught_exception(), but patch comments say:
| This is one of the rare situations where using std::uncaught_exception() is
| actually the right thing to do.
so you've thought it through.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]