travis: test 10.9 using Ruby 1.8.

Closes Homebrew/homebrew#45816.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Mike McQuaid 2015-11-18 15:59:08 +00:00
parent 11a421948d
commit c6621faf18
3 changed files with 30 additions and 15 deletions

View File

@ -10,7 +10,7 @@ matrix:
os: osx os: osx
osx_image: xcode7 osx_image: xcode7
rvm: system rvm: system
- env: OSX=10.9 - env: OSX=10.9 HOMEBREW_RUBY=1.8.7
os: osx os: osx
osx_image: beta-xcode6.2 osx_image: beta-xcode6.2
rvm: system rvm: system
@ -21,12 +21,20 @@ before_install:
- sudo rm -rf /usr/local/.git/refs /usr/local/.git/packed-refs - sudo rm -rf /usr/local/.git/refs /usr/local/.git/packed-refs
- sudo rsync -az "$TRAVIS_BUILD_DIR/" /usr/local/ - sudo rsync -az "$TRAVIS_BUILD_DIR/" /usr/local/
- export TRAVIS_BUILD_DIR="/usr/local" - export TRAVIS_BUILD_DIR="/usr/local"
- sudo chown -R $USER /usr/local - if [ -f ".git/shallow" ]; then
- env | grep TRAVIS_ travis_retry git fetch --unshallow;
- if [ -f ".git/shallow" ]; then travis_retry git fetch --unshallow; fi fi
- git reset --hard $TRAVIS_COMMIT - git reset --hard $TRAVIS_COMMIT
- git clean -qxdff - git clean -qxdff
install:
- if [ "$HOMEBREW_RUBY" = "1.8.7" ]; then
brew install homebrew/versions/ruby187;
export PATH="/usr/local/opt/ruby187/bin:$PATH";
export HOMEBREW_RUBY_PATH="/usr/local/opt/ruby187/bin/ruby";
fi
- export HOMEBREW_DEVELOPER="1"
script: script:
- brew test-bot - brew test-bot

View File

@ -632,7 +632,7 @@ module Homebrew
else else
test "brew", "tests", "--no-compat" test "brew", "tests", "--no-compat"
readall_args = ["--aliases"] readall_args = ["--aliases"]
readall_args << "--syntax" if MacOS.version >= :mavericks readall_args << "--syntax" if RUBY_VERSION.split(".").first.to_i >= 2
test "brew", "readall", *readall_args test "brew", "readall", *readall_args
test "brew", "update-test" test "brew", "update-test"
end end

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
chdir() {
chdir () {
cd "$@" >/dev/null cd "$@" >/dev/null
} }
@ -22,10 +21,18 @@ BREW_LIBRARY_DIRECTORY=$(chdir "$BREW_FILE_DIRECTORY"/../Library && pwd -P)
unset GEM_HOME unset GEM_HOME
unset GEM_PATH unset GEM_PATH
BREW_SYSTEM=$(uname -s | tr "[:upper:]" "[:lower:]") if [ -z "$HOMEBREW_DEVELOPER" ]
if [ "$BREW_SYSTEM" = "darwin" ]
then then
exec "$BREW_LIBRARY_DIRECTORY/brew.rb" "$@" unset HOMEBREW_RUBY_PATH
else
exec ruby -W0 "$BREW_LIBRARY_DIRECTORY/brew.rb" "$@"
fi fi
if [ -z "$HOMEBREW_RUBY_PATH" ]; then
BREW_SYSTEM=$(uname -s | tr "[:upper:]" "[:lower:]")
if [ "$BREW_SYSTEM" = "darwin" ]; then
HOMEBREW_RUBY_PATH="/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby"
else
HOMEBREW_RUBY_PATH="ruby"
fi
fi
exec "$HOMEBREW_RUBY_PATH" -W0 "$BREW_LIBRARY_DIRECTORY/brew.rb" "$@"