#!/usr/bin/ruby # This software is in the public domain, furnished "as is", without technical # support, and with no warranty, express or implied, as to its usefulness for # any purpose. ABS__FILE__=File.expand_path(__FILE__) $:.push(File.expand_path(__FILE__+'/../..')) require 'extend/pathname' # these are defined in global.rb, but we don't want to break our actual # homebrew tree, and we do want to test everything :) HOMEBREW_PREFIX=Pathname.new '/private/tmp/testbrew/prefix' HOMEBREW_REPOSITORY=HOMEBREW_PREFIX HOMEBREW_CACHE=HOMEBREW_PREFIX.parent+"cache" HOMEBREW_CELLAR=HOMEBREW_PREFIX.parent+"cellar" HOMEBREW_USER_AGENT="Homebrew" HOMEBREW_WWW='http://example.com' MACOS_VERSION=10.6 (HOMEBREW_PREFIX+'Library'+'Formula').mkpath Dir.chdir HOMEBREW_PREFIX at_exit { HOMEBREW_PREFIX.parent.rmtree } require 'utils' require 'hardware' require 'formula' require 'download_strategy' require 'keg' require 'utils' require 'brew.h' require 'hardware' require 'update' # for some reason our utils.rb safe_system behaves completely differently # during these tests. This is worrying for sure. def safe_system *args Kernel.system *args end class ExecutionError " end end module ExtendArgvPlusYeast def reset @named = nil @downcased_unique_named = nil @formulae = nil @kegs = nil ARGV.shift while ARGV.length > 0 end end ARGV.extend ExtendArgvPlusYeast require 'test/test_versions' require 'test/test_checksums' require 'test/test_updater' unless ARGV.include? "--skip-update" require 'test/test_bucket' require 'test/test_inreplace'