defects4j icon indicating copy to clipboard operation
defects4j copied to clipboard

Bug-mining: grep compatibility issue (BSD vs GNU) in minimize patch script

Open rrrrrrockpang opened this issue 3 years ago • 0 comments

The minimize-patch script uses grep to verify that the minimization does not alter the number and behavior of triggering tests. The grep invocation uses a GNU-specific option, which is not available under BSD:

grep: unrecognized option `--no-group-separator'
usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
        [-e pattern] [-f file] [--binary-files=value] [--color=when]
        [--context[=num]] [--directories=action] [--label] [--line-buffered]
        [--null] [pattern] [file ...]

Installing GNU coreutils on OSX is a workaround, but the script should either use a portable grep solution or use native Perl functinos.

rrrrrrockpang avatar Aug 16 '21 21:08 rrrrrrockpang