From 8baa694786fe494e3195c88b19d62d37f7ba4275 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Thu, 8 Mar 2018 17:58:44 +0000 Subject: [PATCH 1/4] Do not run tests from fixtures --- Rakefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 4b438477..bc1f5624 100644 --- a/Rakefile +++ b/Rakefile @@ -13,10 +13,12 @@ end require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) do |t| + excludes = ['fixtures/**/*.rb'] if RUBY_PLATFORM == 'java' - t.exclude_pattern = 'spec/{acceptance/**/*.rb,integration/**/*.rb,puppet/resource_api/*_context_spec.rb,puppet/util/network_device/simple/device_spec.rb}' + excludes += ['acceptance/**/*.rb', 'integration/**/*.rb', 'puppet/resource_api/*_context_spec.rb', 'puppet/util/network_device/simple/device_spec.rb'] t.rspec_opts = '--tag ~agent_test' end + t.exclude_pattern = "spec/{#{excludes.join ','}}" end namespace :spec do From 408eca131e1c518bd6209e85ff2bdfc0c7305694 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Fri, 9 Mar 2018 13:54:34 +0000 Subject: [PATCH 2/4] Fixup test_module metadata --- spec/fixtures/test_module/metadata.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/fixtures/test_module/metadata.json b/spec/fixtures/test_module/metadata.json index 86c26969..f87a3d0a 100644 --- a/spec/fixtures/test_module/metadata.json +++ b/spec/fixtures/test_module/metadata.json @@ -1,8 +1,8 @@ { - "name": "puppetlabs-test_device", + "name": "puppetlabs-test_module", "version": "0.1.0", "author": "David Schmitt", - "summary": "Test module for device support", + "summary": "Test module", "license": "Apache-2.0", "source": "https://github.com/puppetlabs/puppet-resource_api", "dependencies": [ From cbb4d8f9b643ab97196c2279f18235cbc766b781 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Fri, 9 Mar 2018 18:08:47 +0000 Subject: [PATCH 3/4] Enable JRuby debugging to get more accurate coverage results JRuby complained on travis: ``` Coverage may be inaccurate; set the "--debug" command line option, or do JRUBY_OPTS="--debug" or set the "debug.fullTrace=true" option in your .jrubyrc /home/travis/build/puppetlabs/puppet-resource_api/vendor/bundle/jruby/2.3.0/gems/simplecov-0.15.1/lib/simplecov.rb:48: warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag ``` --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1c17716c..e1a12b86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,9 +14,9 @@ matrix: - rvm: 2.4.1 env: PUPPET_GEM_VERSION='~> 5' - rvm: jruby-1.7.26 - env: PUPPET_GEM_VERSION='~> 5' + env: PUPPET_GEM_VERSION='~> 5' JRUBY_OPTS="--debug" - rvm: jruby-9.1.9.0 - env: PUPPET_GEM_VERSION='~> 5' + env: PUPPET_GEM_VERSION='~> 5' JRUBY_OPTS="--debug" - rvm: 2.4.1 env: CHECK=rubocop - rvm: 2.4.1 From f83253509a8dcbdb715e5890115f665b2dbcefe1 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Fri, 9 Mar 2018 18:20:37 +0000 Subject: [PATCH 4/4] Remove manual bundler downgrade On travis, bundler automatically uses 1.16.1 anyways --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e1a12b86..6215261b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ sudo: false language: ruby -before_install: gem install bundler -v 1.15.4 bundler_args: "--without development" script: - echo travis_fold:start:DEBUG