Issue Details (XML | Word | Printable)

Key: STDCXX-261
Type: Improvement Improvement
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Andrew Black
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library

runall should parse tests and examples in the same manner

Created: 17/Jul/06 10:41 PM   Updated: 12/Mar/08 03:39 AM
Return to search
Component/s: Build and Installation
Affects Version/s: 4.1.3, 4.2.0
Fix Version/s: 4.3.0

Time Tracking:
Original Estimate: 16h
Original Estimate - 16h
Remaining Estimate: 16h
Remaining Estimate - 16h
Time Spent: Not Specified
Remaining Estimate - 16h

Severity: Usability


 Description  « Hide
At this time, several of the self tests (0.cmdopts.out, 0.printf.out, 0.strncmp.out, 0.valcmp.out) produce output that lacks a summary section.

The runall.sh (or runall.c) utility should be able to compare the output of these tests against a reference file in the same manner that the output is compared for examples.

An extension of this concept is that it might make sense to unify the logic used to check the test and example results, so that the same process would be used for both tests and examples.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Martin Sebor added a comment - 03/Aug/06 03:25 PM
It would be nice if the runall aka exec utility could somehow figure out from the executable itself what kind of output to expect and adjust automatically. This would let it distinguish not only the tests designed to produce different output but also examples from tests, and it might open a whole bunch of other possibilities as well. One approach might be to embed some sort of a special string (e.g., in the form of an RCS comment) in the executable itself and having the utility read it (see http://www.delorie.com/gnu/docs/rcs/ident.1.html).

Andrew Black added a comment - 03/Aug/06 04:53 PM
The main drawback I can see with using RCS comments is that we would need to reimplement the ident utility in some manner to retrieve the RCS comments strings. ident isn't a part of the POSIX spec, and even if it were, it would be necessary to provide an implementation for windows.

A couple minor concerns would be ensuring that the RCS comment strings aren't optimized away and that RCS comments are inserted into the shell script (locale) targets.

To me, useful information that could be embedded would be the location of the reference input file (if one exists) and the reference output file. This would eliminate the search logic used at this time to locate said files. This would also allow tests to have such files. Another piece of useful information could be the format of the output file generated, allowing us to distinguish test suite driver output from compatibility layer output (eliminating the compat global and the -compat/-nocompat switches).

In an off-line discussion with Martin, he noted that another useful piece of information that could be embedded in a test would be platform-specific control over which tests are enabled/disabled. I wonder whether it would make more sense for such enable/disable logic to reside in the test suite/test driver, rather than the exec utility.


Andrew Black added a comment - 24/Aug/07 11:51 PM
Scheduling for 4.2.1, though it may be deferred again.

Martin Sebor added a comment - 12/Mar/08 03:38 AM
Added 4.2.0 to affected versions and deferred to 4.3.

Martin Sebor added a comment - 12/Mar/08 03:39 AM
We might want to consider this when extending the Expected Failure feature to handle failed test assertions since we'll most likely be changing the format of the test driver output.