<<

NAME

merge_tests.pl -- replace test methods 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

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

<<