Merge pull request #1914 from MikeMcQuaid/test-gem-updates

*/Gemfile*: remove rake, version pins, master simplecov.
This commit is contained in:
Mike McQuaid 2017-01-29 17:49:49 +00:00 committed by GitHub
commit 73fd972391
9 changed files with 54 additions and 102 deletions

View File

@ -1,24 +1,13 @@
source "https://rubygems.org"
gem "rake"
group :test do
# This is SimpleCov v0.12.0 with two fixes merged on top, that finally resolve
# all issues with parallel tests, uncovered files, and tracked files. Switch
# back to stable as soon as v0.12.1 or v0.13.0 is released. For details, see:
# - https://github.com/colszowka/simplecov/pull/513
# - https://github.com/colszowka/simplecov/pull/520
gem "simplecov", "0.12.0",
git: "https://github.com/colszowka/simplecov.git",
branch: "master",
ref: "83d8031ddde0927f87ef9327200a98583ca18d77",
require: false
gem "simplecov", require: false
gem "codecov", require: false
gem "minitest", "~> 5.9"
gem "minitest"
gem "minitest-reporters"
gem "mocha", "~> 1.1", require: false
gem "mocha", require: false
gem "parallel_tests"
gem "rspec", "~> 3.5"
gem "rspec"
gem "rspec-its", require: false
gem "rspec-wait", require: false
end

View File

@ -1,29 +1,18 @@
GIT
remote: https://github.com/colszowka/simplecov.git
revision: 83d8031ddde0927f87ef9327200a98583ca18d77
ref: 83d8031ddde0927f87ef9327200a98583ca18d77
branch: master
specs:
simplecov (0.12.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
GEM
remote: https://rubygems.org/
specs:
ansi (1.5.0)
builder (3.2.2)
builder (3.2.3)
codecov (0.1.9)
json
simplecov
url
diff-lcs (1.2.5)
diff-lcs (1.3)
docile (1.1.5)
json (2.0.2)
json (2.0.3)
metaclass (0.0.4)
minitest (5.10.1)
minitest-reporters (1.1.13)
minitest-reporters (1.1.14)
ansi
builder
minitest (>= 5.0)
@ -31,9 +20,8 @@ GEM
mocha (1.2.1)
metaclass (~> 0.0.1)
parallel (1.10.0)
parallel_tests (2.10.0)
parallel_tests (2.13.0)
parallel
rake (12.0.0)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
@ -53,6 +41,10 @@ GEM
rspec-wait (0.0.9)
rspec (>= 3, < 4)
ruby-progressbar (1.8.1)
simplecov (0.13.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
url (0.3.2)
@ -61,15 +53,14 @@ PLATFORMS
DEPENDENCIES
codecov
minitest (~> 5.9)
minitest
minitest-reporters
mocha (~> 1.1)
mocha
parallel_tests
rake
rspec (~> 3.5)
rspec
rspec-its
rspec-wait
simplecov (= 0.12.0)!
simplecov
BUNDLED WITH
1.13.6
1.13.7

View File

@ -1,17 +0,0 @@
require "rake/testtask"
require "rspec/core/rake_task"
$LOAD_PATH.unshift(File.expand_path("#{ENV["HOMEBREW_REPOSITORY"]}/Library/Homebrew"))
$LOAD_PATH.unshift(File.expand_path("../lib", __FILE__))
namespace :test do
namespace :coverage do
desc "Upload coverage to Codecov"
task :upload do
require "simplecov"
require "codecov"
formatter = SimpleCov::Formatter::Codecov.new
formatter.format(SimpleCov::ResultMerger.merged_result)
end
end
end

View File

@ -10,8 +10,8 @@ def run_tests(executable, files, args = [])
system "bundle", "exec", executable, *opts, "--", *args, "--", *files
end
repo_root = Pathname.new(__FILE__).realpath.parent.parent
repo_root.cd do
cask_root = Pathname.new(__FILE__).realpath.parent.parent
cask_root.cd do
ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1"
ENV["HOMEBREW_NO_EMOJI"] = "1"
ENV.delete("HOMEBREW_CASK_OPTS")
@ -24,7 +24,6 @@ repo_root.cd do
rspec = ARGV.flag?("--rspec") || !ARGV.flag?("--minitest")
minitest = ARGV.flag?("--minitest") || !ARGV.flag?("--rspec")
p [:coverage, ARGV.flag?("--coverage"), ENV["CI"], ENV["TRAVIS"]]
if ARGV.flag?("--coverage")
ENV["HOMEBREW_TESTS_COVERAGE"] = "1"
upload_coverage = ENV["CODECOV_TOKEN"] || ENV["TRAVIS"]
@ -52,6 +51,6 @@ repo_root.cd do
if upload_coverage
puts "Submitting Codecov coverage..."
system "bundle", "exec", "rake", "test:coverage:upload"
system "bundle", "exec", "test/upload_coverage.rb"
end
end

View File

@ -0,0 +1,6 @@
#!/usr/bin/env ruby
require "simplecov"
require "codecov"
formatter = SimpleCov::Formatter::Codecov.new
formatter.format SimpleCov::ResultMerger.merged_result

View File

@ -1,20 +1,10 @@
source "https://rubygems.org"
gem "mocha", "~> 1.1"
gem "minitest", "~> 5.3"
gem "rake", "~> 10.3"
gem "parallel_tests", "~> 2.9"
gem "mocha"
gem "minitest"
gem "parallel_tests"
group :coverage do
# This is SimpleCov v0.12.0 with two fixes merged on top, that finally resolve
# all issues with parallel tests, uncovered files, and tracked files. Switch
# back to stable as soon as v0.12.1 or v0.13.0 is released. For details, see:
# - https://github.com/colszowka/simplecov/pull/513
# - https://github.com/colszowka/simplecov/pull/520
gem "simplecov", "0.12.0",
git: "https://github.com/colszowka/simplecov.git",
branch: "master",
ref: "83d8031ddde0927f87ef9327200a98583ca18d77",
require: false
gem "simplecov", require: false
gem "codecov", require: false
end

View File

@ -1,31 +1,23 @@
GIT
remote: https://github.com/colszowka/simplecov.git
revision: 83d8031ddde0927f87ef9327200a98583ca18d77
ref: 83d8031ddde0927f87ef9327200a98583ca18d77
branch: master
specs:
simplecov (0.12.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
GEM
remote: https://rubygems.org/
specs:
codecov (0.1.6)
codecov (0.1.9)
json
simplecov
url
docile (1.1.5)
json (2.0.2)
json (2.0.3)
metaclass (0.0.4)
minitest (5.9.1)
minitest (5.10.1)
mocha (1.2.1)
metaclass (~> 0.0.1)
parallel (1.9.0)
parallel_tests (2.10.0)
parallel (1.10.0)
parallel_tests (2.13.0)
parallel
rake (10.5.0)
simplecov (0.13.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
url (0.3.2)
@ -34,11 +26,10 @@ PLATFORMS
DEPENDENCIES
codecov
minitest (~> 5.3)
mocha (~> 1.1)
parallel_tests (~> 2.9)
rake (~> 10.3)
simplecov (= 0.12.0)!
minitest
mocha
parallel_tests
simplecov
BUNDLED WITH
1.13.6
1.13.7

View File

@ -14,9 +14,9 @@ class ShellSmokeTest < Homebrew::TestCase
end
def test_path_to_shell_failure
assert_equal nil, Utils::Shell.path_to_shell("")
assert_equal nil, Utils::Shell.path_to_shell("@@@@@@")
assert_equal nil, Utils::Shell.path_to_shell("invalid_shell-4.2")
assert_nil Utils::Shell.path_to_shell("")
assert_nil Utils::Shell.path_to_shell("@@@@@@")
assert_nil Utils::Shell.path_to_shell("invalid_shell-4.2")
end
def test_sh_quote

View File

@ -241,15 +241,18 @@ class TabTests < Homebrew::TestCase
assert_equal @tab.changed_files, tab.changed_files
assert_equal @tab.tap, tab.tap
assert_equal @tab.spec, tab.spec
assert_equal @tab.time, tab.time
assert_nil @tab.time
assert_nil tab.time
assert_equal @tab.HEAD, tab.HEAD
assert_equal @tab.compiler, tab.compiler
assert_equal @tab.stdlib, tab.stdlib
assert_equal @tab.runtime_dependencies, tab.runtime_dependencies
assert_nil @tab.runtime_dependencies
assert_nil tab.runtime_dependencies
assert_equal @tab.stable_version, tab.stable_version
assert_equal @tab.devel_version, tab.devel_version
assert_equal @tab.head_version, tab.head_version
assert_equal @tab.source["path"], tab.source["path"]
assert_nil @tab.source["path"]
assert_nil tab.source["path"]
end
def test_remap_deprecated_options