<<

NAME

merge_tests.pl -- Replace test methods from a set of test classes with a different version.

SYNOPSIS

merge_tests.pl log_file target_src_dir other_src_dir [test_name]

DESCRIPTION

Parses the file log_file and replaces failing test methods in target_src_dir by replacing the body of each broken test method in the source file with the body of the corresponding source file in other_src_dir. The source file of the test class is backed up prior to the first modification.

If test_name is specified, only that test is replaced. test_name must be in the format of classname::methodname.

The log file may contain arbitrary lines -- the script only considers lines that match the pattern: /--- ([^:]*)(::(.*))?/.

Example entries in the log file

Failing test class: --- package.Class
Failing test method: --- package.Class::method

All lines matching the pattern are sorted, such that a failing test class in the list will appear before any of its failing methods.

<<