Re: Stopping unit test on failed partial ordering dependency

2019-04-22 Thread John Calcote
On Mon, Apr 22, 2019 at 10:12 PM Kip Warner  wrote:

> How can I solve this problem?


Try using a stamp file only created on success. To do this you’ll need to
wrap your test calls in a script that creates the stamp file on success.

John

>


Stopping unit test on failed partial ordering dependency

2019-04-22 Thread Kip Warner
Hey list,

I have a bunch of unit tests declared in check_PROGRAMS and
check_SCRIPTS. Some tests can only be run after others, while some
others can only be run before others.

I've managed to solve this problem pursuant to § 15.2.1 via partial
ordering constraints. This is done by declaring explicit make
prerequisites between the generated log files. This works fine, even
when using the parallel test harness. But only as long as all the tests
pass.

One problem I am having is if test B is dependent on test A to complete
successfully before it can run, but A fails. B will run anyways only
because B.log depended on A.log. A.log was generated regardless of
whether test A was a pass or fail.

Consider the situation where a database is setup, a daemon is spawned,
various client requests are serviced in any order, the daemon is
shutdown, and lastly the database is torn down. If the unit test to
spawn the daemon fails for any reason, all the client requests are
bound to fail anyways so there's no point on trying to debug them when
the problem is obvious that the daemon isn't running.

How can I solve this problem?

-- 
Kip Warner | Senior Software Engineer
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part