aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorBulat Shakirzyanov2014-07-01 23:29:32 +0100
committerMike McQuaid2014-07-01 23:29:53 +0100
commita334973de8096a08c5ee9a35ed7ef3b6402b7a78 (patch)
tree6c6aa71a7c9821080e5257f8cac574f3c0b8375d /Library
parent07191fc15a94158b43bfa080401db25816d72141 (diff)
downloadhomebrew-a334973de8096a08c5ee9a35ed7ef3b6402b7a78.tar.bz2
mesos: cleanup formula.
Closes #30045. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/mesos.rb20
1 files changed, 19 insertions, 1 deletions
diff --git a/Library/Formula/mesos.rb b/Library/Formula/mesos.rb
index 97a729031..1be6169d3 100644
--- a/Library/Formula/mesos.rb
+++ b/Library/Formula/mesos.rb
@@ -37,6 +37,24 @@ class Mesos < Formula
end
test do
- system "#{sbin}/mesos-master", "--version"
+ require "timeout"
+
+ master = fork do
+ exec "#{sbin}/mesos-master", "--ip=127.0.0.1",
+ "--registry=in_memory"
+ end
+ slave = fork do
+ exec "#{sbin}/mesos-slave", "--master=127.0.0.1:5050",
+ "--work_dir=#{testpath}"
+ end
+ Timeout::timeout(15) do
+ system "#{bin}/mesos", "execute",
+ "--master=127.0.0.1:5050",
+ "--name=execute-touch",
+ "--command=touch\s#{testpath}/executed"
+ end
+ Process.kill("TERM", master)
+ Process.kill("TERM", slave)
+ system "[ -e #{testpath}/executed ]"
end
end