From 29cac8016a09f3a0f9e941ca51db3f0a6df98b60 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 26 Feb 2009 15:51:29 -0800 Subject: test_exec: simplify check for unicorn binary --- test/exec/test_exec.rb | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/test/exec/test_exec.rb b/test/exec/test_exec.rb index 8974faf..9f65ce3 100644 --- a/test/exec/test_exec.rb +++ b/test/exec/test_exec.rb @@ -9,16 +9,9 @@ do_test = true $unicorn_bin = ENV['UNICORN_TEST_BIN'] || "unicorn" redirect_test_io do - pid = fork do - exec($unicorn_bin, '-v') - exit(1) - end - Process.waitpid(pid) -end -unless $?.success? - STDERR.puts "#{$unicorn_bin} not found in PATH=#{ENV['PATH']}, "\ - "skipping this test" - do_test = false + do_test = system($unicorn_bin, '-v') or \ + STDERR.puts "#{$unicorn_bin} not found in PATH=#{ENV['PATH']}, "\ + "skipping this test" end begin -- cgit v1.2.3-24-ge0c7