Martin Sebor wrote:
Andrew Black wrote:
[...]
Attached is a patch that implements the rwtest and makefile changes
for this option. One problem observed is that the 22.locale.time.get,
22.locale.time.put, and 27.objects now report a FORMAT status. The
cause of these messages is output after the assertion count has been
printed. The compatibility mode parsing logic searches for the
summary total in a different way than the normal mode, and is
therefore affected by this output where the normal mode isn't.
So is the problem that we start parsing too late in the file
(i.e., seek not far enough back) and end up skipping part of
the important output? Could we start parsing the output at
an earlier point in the file?
That would be an accurate assessment. It would be possible to move the
seek position to a spot earlier in the file, but it would also be
necessary to alter the FSM used to search for the assertion count, as
the current method searches for the string "\n## ", which will also
match in the header of the file. This spurious matching is what lead to
the change to output.cpp embedded into the patch.
--Andrew Black
Changelog:
* tests/src/driver.cpp (_rw_setopt_output_file): Add logic to
treat the magic file name of '-' as a reference to stdout.
Please make sure the ChangeLog lines are 78 characters long
or less.
Martin
* etc/config/GNUmakefile.tst (RUNFLAGS): Specify compatibility
mode flags to enable parsing of legacy tests.
* util/output.cpp (check_compat_test): Adjust seek position to
avoid false format errors when an executable contains a very small
number of tests.