diff options
| author | Mike McQuaid | 2016-09-16 17:17:50 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2016-09-16 17:17:50 +0100 |
| commit | 1649545cf92753732cd22ed909f58b910be01ae4 (patch) | |
| tree | 6c5c64e9613b5f22c352d9ca0872dfcedd28d89d /Library | |
| parent | 53713593d677cb916402742940d14bfc7e60a5a4 (diff) | |
| download | brew-1649545cf92753732cd22ed909f58b910be01ae4.tar.bz2 | |
update-test: handle missing master branch.
Ensure it's always created.
Also, re-order `update-test` in `test-bot` (and `readall`) so they are
run before the test suites.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/dev-cmd/test-bot.rb | 20 | ||||
| -rw-r--r-- | Library/Homebrew/dev-cmd/update-test.rb | 3 |
2 files changed, 12 insertions, 11 deletions
diff --git a/Library/Homebrew/dev-cmd/test-bot.rb b/Library/Homebrew/dev-cmd/test-bot.rb index 1a2095068..7f2235e3a 100644 --- a/Library/Homebrew/dev-cmd/test-bot.rb +++ b/Library/Homebrew/dev-cmd/test-bot.rb @@ -711,6 +711,16 @@ module Homebrew return if @skip_homebrew if !@tap && (@formulae.empty? || @test_default_formula) + # TODO: try to fix this on Linux at some stage. + if OS.mac? + # test update from origin/master to current commit. + test "brew", "update-test" + # test no-op update from current commit (to current commit, a no-op). + test "brew", "update-test", "--commit=HEAD" + end + + test "brew", "readall", "--syntax" + coverage_args = [] if ARGV.include?("--coverage") if ENV["JENKINS_HOME"] @@ -725,19 +735,11 @@ module Homebrew test "brew", "tests", "--no-compat" test "brew", "tests", "--generic" test "brew", "tests", "--official-cmd-taps", *coverage_args - test "brew", "readall", "--syntax" + if OS.mac? run_as_not_developer { test "brew", "tap", "caskroom/cask" } test "brew", "cask-tests", *coverage_args end - - # TODO: try to fix this on Linux at some stage. - if OS.mac? - # test update from origin/master to current commit. - test "brew", "update-test" - # test no-op update from current commit (to current commit, a no-op). - test "brew", "update-test", "--commit=HEAD" - end elsif @tap test "brew", "readall", "--aliases", @tap.name end diff --git a/Library/Homebrew/dev-cmd/update-test.rb b/Library/Homebrew/dev-cmd/update-test.rb index fe0b1bf4d..bcf8020e4 100644 --- a/Library/Homebrew/dev-cmd/update-test.rb +++ b/Library/Homebrew/dev-cmd/update-test.rb @@ -40,8 +40,7 @@ module Homebrew safe_system "git", "config", "remote.origin.url", "#{curdir}/remote.git" # force push origin to end_sha1 - safe_system "git", "checkout", "--force", "master" - safe_system "git", "reset", "--hard", end_sha1 + safe_system "git", "checkout", "-B", "master", end_sha1 safe_system "git", "push", "--force", "origin", "master" # set test copy to start_sha1 |
