~vcs-imports-ii/dejagnu/master

« back to all changes in this revision

Viewing changes to ChangeLog

  • Committer: Jacob Bachmeyer
  • Date: 2022-12-01 04:52:25 UTC
  • Revision ID: git-v1:cc2dcde3edb178434be6ce74fdd12322a35fcfb5
Revise generation of "END" messages in dejagnu.h

The "END" message is now produced upon normal exit, without requiring that
the totals() function or method be called.  The C++ API now emits totals
only when the last TestState object in the program is destroyed, instead
of every time a TestState object is destroyed.  This required adding code
to track the number of live TestState objects.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
2022-11-30  Jacob Bachmeyer  <jcb@gnu.org>
2
2
 
 
3
        * dejagnu.h (DG__endmsg): New function, called using atexit().
 
4
        (endmsg_registered, TestState_count): Add fields to DG__status.
 
5
        (DG__init): New function, to register DG__endmsg.
 
6
        (pass, xpass, fail, xfail, untested, unresolved, unsupported)
 
7
        (note): Call DG__init to ensure libdejagnu initialization.
 
8
        (totals): Move "END" message to DG__endmsg.
 
9
        (TestState::TestState): Consider DG__endmsg registered when a
 
10
        TestState object is constructed.
 
11
        (TestState::TestState, TestState::~TestState): Track number of
 
12
        live TestState objects in global status structure.
 
13
        (TestState::~TestState): Call totals() and emit "END" message only
 
14
        when the last TestState object is destroyed.
 
15
 
3
16
        * dejagnu.h (outstate): Remove.
4
17
        (TestState::pass, TestState::xpass, TestState::fail)
5
18
        (TestState::xfail, TestState::untested, TestState::unresolved)