NAME
autounfudge - automatically write patches for unfudging spec tests
DESCRIPTION
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 autounfudge.patch
that, when applied as patch -p0 < autounfudge.patch
, removes the superfluous fudge directives.
With the --untodo
option, todo
skip markers are also removed (where appropriate), with the --unskip
option it tries to substitute skip
markers by todo
markers.
USAGE
Most common usage: perl tools/autounfudge.pl --auto
. For more options please run this script without any options or command line parameters.
WARNINGS
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.
MISCELLANEA
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 t/spec/S04-statement-modifiers/while.t
), 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.