defects4j
defects4j copied to clipboard
Bug-mining: grep compatibility issue (BSD vs GNU) in minimize patch script
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.