test: check for pgrep/pkill for developers/CI.
If people are running `brew test` but don't have `pgrep` or `pkill` installed the forked processes may never be killed. This is not a big deal on a user's machine but on CI may make a job block and never complete/timeout successfully.
This commit is contained in:
parent
164f0f0ee0
commit
541fecea22
@ -24,6 +24,11 @@ begin
|
||||
|
||||
trap("INT", old_trap)
|
||||
|
||||
if Homebrew::EnvConfig.developer? || ENV["CI"].present?
|
||||
raise "cannot find child processes without `pgrep`, please install!" unless which("pgrep")
|
||||
raise "cannot kill child processes without `pkill`, please install!" unless which("pkill")
|
||||
end
|
||||
|
||||
formula = args.named.to_resolved_formulae.first
|
||||
formula.extend(Homebrew::Assertions)
|
||||
formula.extend(Homebrew::FreePort)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user