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 fudges, runs them again, and if the modified tests succeeds, it adds a patch to autounfudge.patch that, when applied as patch -p0 < autunfudge.patch, removes the superflous fudge directives.

USAGE ^

Most common usage: perl tools/autounfudge.pl --auto. For more use cases pleae run this script without any options or command line parameters.

WARNINGS ^

This tool is platform dependant, and not tested on anthing but linux.

It assumes that all fudge directives are orthogonal, which might not be the case in real world tests. It is not tested with nested fudges (eg a line based fudge inside a fudged block).

Never blindly apply the automatically generated patch.

MISCELANEA ^

Fudge directives containing the words unspecced 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 autoumatically unfudge.


parrot