diff --git a/.travis.yml b/.travis.yml index 5e1906a5c7..c6c42a08ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,8 @@ cache: directories: - $HOME/.gem/ruby - Library/Homebrew/vendor/bundle + # For parallel_rspec + - Library/Homebrew/tmp matrix: include: @@ -10,6 +12,7 @@ matrix: osx_image: xcode8.3 rvm: system - os: linux + sudo: false rvm: 2.0.0 before_install: diff --git a/Library/Homebrew/dev-cmd/tap-new.rb b/Library/Homebrew/dev-cmd/tap-new.rb index 48449e98d5..dcb41265cb 100644 --- a/Library/Homebrew/dev-cmd/tap-new.rb +++ b/Library/Homebrew/dev-cmd/tap-new.rb @@ -49,6 +49,10 @@ module Homebrew env: OSX=10.12 osx_image: xcode8.3 rvm: system + cache: + directories: + - $HOME/.gem/ruby + - Library/Homebrew/vendor/bundle before_install: - export TRAVIS_COMMIT="$(git rev-parse --verify -q HEAD)" diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb index 72d6143fcf..d903267684 100644 --- a/Library/Homebrew/dev-cmd/tests.rb +++ b/Library/Homebrew/dev-cmd/tests.rb @@ -79,20 +79,24 @@ module Homebrew Dir.glob("test/**/*_spec.rb").reject { |p| p =~ %r{^test/vendor/bundle/} } end - opts = [] - - if ENV["CI"] - opts << "--combine-stderr" - opts << "--serialize-stdout" + opts = if ENV["CI"] + %w[ + --combine-stderr + --serialize-stdout + ] + else + %w[ + --nice + ] end - args = [ - "--color", - "-I", HOMEBREW_LIBRARY_PATH/"test", - "--require", "spec_helper", - "--format", "progress", - "--format", "ParallelTests::RSpec::RuntimeLogger", - "--out", "tmp/parallel_runtime_rspec.log" + args = ["-I", HOMEBREW_LIBRARY_PATH/"test"] + args += %w[ + --color + --require spec_helper + --format progress + --format ParallelTests::RSpec::RuntimeLogger + --out tmp/parallel_runtime_rspec.log ] args << "--seed" << ARGV.next if ARGV.include? "--seed" diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index db9115aae5..ad87c2a5fb 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -656,8 +656,9 @@ class FormulaInstaller Sandbox.print_sandbox_message if Sandbox.formula?(formula) Utils.safe_fork do - # Invalidate the current sudo timestamp in case a build script calls sudo - system "/usr/bin/sudo", "-k" + # Invalidate the current sudo timestamp in case a build script calls sudo. + # Travis CI's Linux sudoless workers have a weird sudo that fails here. + system "/usr/bin/sudo", "-k" unless ENV["TRAVIS_SUDO"] == "false" if Sandbox.formula?(formula) sandbox = Sandbox.new diff --git a/Library/Homebrew/test/Gemfile.lock b/Library/Homebrew/test/Gemfile.lock index 4d4eefd7d7..1f6adae933 100644 --- a/Library/Homebrew/test/Gemfile.lock +++ b/Library/Homebrew/test/Gemfile.lock @@ -2,51 +2,53 @@ GEM remote: https://rubygems.org/ specs: ast (2.3.0) - codecov (0.1.9) + codecov (0.1.10) json simplecov url diff-lcs (1.3) docile (1.1.5) - json (2.0.3) - parallel (1.10.0) - parallel_tests (2.13.0) + json (2.1.0) + parallel (1.11.2) + parallel_tests (2.14.1) parallel parser (2.4.0.0) ast (~> 2.2) powerpack (0.1.1) - rainbow (2.2.1) - rspec (3.5.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-core (3.5.4) - rspec-support (~> 3.5.0) - rspec-expectations (3.5.0) + rainbow (2.2.2) + rake + rake (12.0.0) + rspec (3.6.0) + rspec-core (~> 3.6.0) + rspec-expectations (~> 3.6.0) + rspec-mocks (~> 3.6.0) + rspec-core (3.6.0) + rspec-support (~> 3.6.0) + rspec-expectations (3.6.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) + rspec-support (~> 3.6.0) rspec-its (1.2.0) rspec-core (>= 3.0.0) rspec-expectations (>= 3.0.0) - rspec-mocks (3.5.0) + rspec-mocks (3.6.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-support (3.5.0) + rspec-support (~> 3.6.0) + rspec-support (3.6.0) rspec-wait (0.0.9) rspec (>= 3, < 4) - rubocop (0.47.1) + rubocop (0.48.1) parser (>= 2.3.3.1, < 3.0) powerpack (~> 0.1) rainbow (>= 1.99.1, < 3.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) ruby-progressbar (1.8.1) - simplecov (0.13.0) + simplecov (0.14.1) docile (~> 1.1.0) json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.0) - unicode-display_width (1.1.3) + unicode-display_width (1.2.1) url (0.3.2) PLATFORMS @@ -62,4 +64,4 @@ DEPENDENCIES simplecov BUNDLED WITH - 1.14.5 + 1.14.6