From a005834d7a6094bc67ab3fd2634336fa1f473ced Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 8 Mar 2012 00:41:38 -0800 Subject: [PATCH] Run tests from anywhere and provide an exit code. --- Library/Homebrew/test/tests | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/Library/Homebrew/test/tests b/Library/Homebrew/test/tests index 8d24ea435e..adbc600ec6 100755 --- a/Library/Homebrew/test/tests +++ b/Library/Homebrew/test/tests @@ -1,18 +1,23 @@ #!/bin/bash # This shell script runs Homebrew's test suite. -/usr/bin/ruby test_bucket.rb $* -/usr/bin/ruby test_formula.rb $* -/usr/bin/ruby test_versions.rb $* -/usr/bin/ruby test_checksums.rb $* -/usr/bin/ruby test_inreplace.rb $* -/usr/bin/ruby test_hardware.rb $* -/usr/bin/ruby test_formula_install.rb $* -/usr/bin/ruby test_patching.rb $* -/usr/bin/ruby test_external_deps.rb $* -/usr/bin/ruby test_pathname_install.rb $* -/usr/bin/ruby test_utils.rb $* -/usr/bin/ruby test_ARGV.rb $* -/usr/bin/ruby test_ENV.rb $* -/usr/bin/ruby test_updater.rb $* -/usr/bin/ruby test_string.rb $* +cd `dirname $0` + +EXIT=0 +/usr/bin/ruby test_bucket.rb $* || EXIT=1 +/usr/bin/ruby test_formula.rb $* || EXIT=1 +/usr/bin/ruby test_versions.rb $* || EXIT=1 +/usr/bin/ruby test_checksums.rb $* || EXIT=1 +/usr/bin/ruby test_inreplace.rb $* || EXIT=1 +/usr/bin/ruby test_hardware.rb $* || EXIT=1 +/usr/bin/ruby test_formula_install.rb $* || EXIT=1 +/usr/bin/ruby test_patching.rb $* || EXIT=1 +/usr/bin/ruby test_external_deps.rb $* || EXIT=1 +/usr/bin/ruby test_pathname_install.rb $* || EXIT=1 +/usr/bin/ruby test_utils.rb $* || EXIT=1 +/usr/bin/ruby test_ARGV.rb $* || EXIT=1 +/usr/bin/ruby test_ENV.rb $* || EXIT=1 +/usr/bin/ruby test_updater.rb $* || EXIT=1 +/usr/bin/ruby test_string.rb $* || EXIT=1 + +exit $EXIT \ No newline at end of file