Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/tests/bin/sh
Module Name: src
Committed By: kre
Date: Tue Nov 24 13:09:13 UTC 2026
Added Files:
src/tests/bin/sh: renumber-sh-tests
Log Message:
src/tests/bin/sh - add a source code maintenance script
The sh tests contain many sets of tests which, when one fails, reports the
number of the test which failed (along with symptoms, actual code, ...) as
part of the failure log. Those numbers match numbers inserted as comments
with the tests, to allow the actual test to be more easily found (there tend
to be many which differ in just small details, hunting for the correct code
can be time consuming and error prone).
Until now, keeping those (comment) numbers correct has been a manual process,
itself almost as likely to fail as any of the tests the numbers are intended
to help identify.
This script (which has a very limited scope, just the shell ATF test sources
- and not even all, or even a majority, of those) will create a modified
version of the source code with all the comment numbers corrected. That
can then be compared with the unmodified version, and if all looks good,
replace it.
Initial insertion of the comments where they are needed is still a manual
process, but it is now irrelevant what number is inserted for each, the
human insertion can just have them all indicate test #1 - the script will
correct the numbers, leaving the comments in the same positions.
To work in some cases the test source may need some annotations added to
allow the script to work out the intent (like only numbering every 5th test,
or similar, or skipping some numbers because there is no good place to attach
them to the test code).
Aside from being used to help maintain the shell ATF test source, the script
has no purpose, it isn't installed anywhere, isn't mentioned (at all) in any
Makefile (or fragment thereof) and nothing breaks in any way if it simply were
to vanish (would just mean back to manual test number updating).
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/tests/bin/sh/renumber-sh-tests
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index