autounfudge - automatically write patches for unfudging spec tests
This tool runs the non-pure tests of the
spectest make target,
automatically creates files with less 'skip' fudge directives,
runs them again,
and if the modified tests succeeds,
it adds a patch to
when applied as
patch -p0 < autounfudge.patch,
removes the superfluous fudge directives.
todo skip markers are also removed (where appropriate),
--unskip option it tries to substitute
skip markers by
Most common usage:
perl tools/autounfudge.pl --auto.
For more options please run this script without any options or command line parameters.
This tool assumes that all fudge directives are orthogonal,
which might not be the case in real world tests.
So always make sure to run
make spectest before committing the changes.
Never blindly apply the automatically generated patch.
Fudge directives containing the words unspecced, noauto or unicode are ignored. The latter is because Unicode related tests can succeed on platforms with icu installed, and fail on other platforms.
By default some files are skipped (which can be overridden with the
--exclude option) because certain tests loop (at the time of writing
others because processing them simply takes too long;
t/spec/S05-mass/rx.t contains more than 250 fudge lines and thus would take about three hours to automatically unfudge.