Hello community, here is the log from the commit of package rubygem-parallel_tests for openSUSE:Factory checked in at 2018-11-28 11:09:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-parallel_tests (Old) and /work/SRC/openSUSE:Factory/.rubygem-parallel_tests.new.19453 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rubygem-parallel_tests" Wed Nov 28 11:09:58 2018 rev:3 rq:651613 version:2.27.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-parallel_tests/rubygem-parallel_tests.changes 2018-10-01 09:03:58.303967698 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-parallel_tests.new.19453/rubygem-parallel_tests.changes 2018-11-28 11:10:06.467174936 +0100 @@ -1,0 +2,6 @@ +Thu Nov 22 05:26:39 UTC 2018 - Stephan Kulow <coolo@suse.com> + +- updated to version 2.27.0 + no changelog found + +------------------------------------------------------------------- Old: ---- parallel_tests-2.22.1.gem New: ---- parallel_tests-2.27.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-parallel_tests.spec ++++++ --- /var/tmp/diff_new_pack.wO7BfI/_old 2018-11-28 11:10:08.331172403 +0100 +++ /var/tmp/diff_new_pack.wO7BfI/_new 2018-11-28 11:10:08.335172398 +0100 @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -24,12 +24,12 @@ # Name: rubygem-parallel_tests -Version: 2.22.1 +Version: 2.27.0 Release: 0 %define mod_name parallel_tests %define mod_full_name %{mod_name}-%{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: %{ruby >= 2.0.0} +BuildRequires: %{ruby >= 2.2.0} BuildRequires: %{rubygem gem2rpm} BuildRequires: ruby-macros >= 5 BuildRequires: update-alternatives ++++++ parallel_tests-2.22.1.gem -> parallel_tests-2.27.0.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Readme.md new/Readme.md --- old/Readme.md 2018-09-03 17:54:35.000000000 +0200 +++ new/Readme.md 2018-11-09 23:00:42.000000000 +0100 @@ -115,7 +115,7 @@ To use a custom logfile location (default: `tmp/parallel_runtime_rspec.log`), use the CLI: `parallel_test spec -t rspec --runtime-log my.log` -### Test::Unit & Minitest 4/5 +### Minitest Add to your `test_helper.rb`: ```ruby @@ -286,7 +286,6 @@ ==== - fix tests vs cucumber >= 1.2 `unknown option --format` - add unit tests for cucumber runtime formatter - - fix windows bugs / get windows CI green Authors ==== @@ -371,6 +370,9 @@ - [Scott Olsen](https://github.com/scottolsen) - [Andrei Botalov](https://github.com/abotalov) - [Zachary Attas](https://github.com/snackattas) + - [David Rodríguez](https://github.com/deivid-rodriguez) + - [Justin Doody](https://github.com/justindoody) + - [Sandeep Singh](https://github.com/sandeepnagra) [Michael Grosser](http://grosser.it)<br/> michael@grosser.it<br/> Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/parallel_tests/cucumber/scenario_line_logger.rb new/lib/parallel_tests/cucumber/scenario_line_logger.rb --- old/lib/parallel_tests/cucumber/scenario_line_logger.rb 2018-09-03 17:54:35.000000000 +0200 +++ new/lib/parallel_tests/cucumber/scenario_line_logger.rb 2018-11-09 23:00:42.000000000 +0100 @@ -1,3 +1,4 @@ +require 'cucumber/tag_expressions/parser' require 'cucumber/core/gherkin/tag_expression' module ParallelTests @@ -12,7 +13,7 @@ end def visit_feature_element(uri, feature_element, feature_tags, line_numbers: []) - scenario_tags = feature_element[:tags].map {|tag| ::Cucumber::Core::Ast::Tag.new(tag[:location], tag[:name])} + scenario_tags = feature_element[:tags].map { |tag| tag[:name] } scenario_tags = feature_tags + scenario_tags if feature_element[:examples].nil? # :Scenario test_line = feature_element[:location][:line] @@ -25,7 +26,7 @@ @scenarios << [uri, feature_element[:location][:line]].join(":") else # :ScenarioOutline feature_element[:examples].each do |example| - example_tags = example[:tags].map {|tag| ::Cucumber::Core::Ast::Tag.new(tag[:location], tag[:name])} + example_tags = example[:tags].map { |tag| tag[:name] } example_tags = scenario_tags + example_tags next unless @tag_expression.evaluate(example_tags) rows = example[:tableBody].select { |body| body[:type] == :TableRow } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/parallel_tests/cucumber/scenarios.rb new/lib/parallel_tests/cucumber/scenarios.rb --- old/lib/parallel_tests/cucumber/scenarios.rb 2018-09-03 17:54:35.000000000 +0200 +++ new/lib/parallel_tests/cucumber/scenarios.rb 2018-11-09 23:00:42.000000000 +0100 @@ -1,31 +1,38 @@ +require 'cucumber/tag_expressions/parser' require 'cucumber/core/gherkin/tag_expression' require 'cucumber/runtime' require 'cucumber' require 'parallel_tests/cucumber/scenario_line_logger' require 'parallel_tests/gherkin/listener' require 'gherkin/errors' +require 'shellwords' module ParallelTests module Cucumber class Scenarios class << self def all(files, options={}) + # Parse tag expression from given test options and ignore tag pattern. Refer here to understand how new tag expression syntax works - https://github.com/cucumber/cucumber/tree/master/tag-expressions tags = [] - tags.concat options[:ignore_tag_pattern].to_s.split(/\s*,\s*/).map {|tag| "~#{tag}" } - tags.concat options[:test_options].to_s.scan(/(?:-t|--tags) (~?@[\w,~@]+)/).flatten + words = options[:test_options].to_s.shellsplit + words.each_with_index { |w,i| tags << words[i+1] if ["-t", "--tags"].include?(w) } + if ignore = options[:ignore_tag_pattern] + tags << "not (#{ignore})" + end + tags_exp = tags.compact.join(" and ") - split_into_scenarios files, tags.uniq + split_into_scenarios files, tags_exp end private - def split_into_scenarios(files, tags=[]) - - # Create the tag expression instance from gherkin, this is needed to know if the scenario matches with the tags invoked by the request - tag_expression = ::Cucumber::Core::Gherkin::TagExpression.new(tags) + def split_into_scenarios(files, tags='') + # Create the tag expression instance from cucumber tag expressions parser, this is needed to know if the scenario matches with the tags invoked by the request # Create the ScenarioLineLogger which will filter the scenario we want - scenario_line_logger = ParallelTests::Cucumber::Formatters::ScenarioLineLogger.new(tag_expression) + args = [] + args << ::Cucumber::TagExpressions::Parser.new.parse(tags) unless tags.empty? + scenario_line_logger = ParallelTests::Cucumber::Formatters::ScenarioLineLogger.new(*args) # here we loop on the files map, each file will contain one or more scenario features ||= files.map do |path| @@ -45,7 +52,7 @@ begin # We make an attempt to parse the gherkin document, this could be failed if the document is not well formatted result = parser.parse(scanner) - feature_tags = result[:feature][:tags].map { |tag| ::Cucumber::Core::Ast::Tag.new(tag[:location], tag[:name]) } + feature_tags = result[:feature][:tags].map { |tag| tag[:name] } # We loop on each children of the feature result[:feature][:children].each do |feature_element| diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/parallel_tests/gherkin/runtime_logger.rb new/lib/parallel_tests/gherkin/runtime_logger.rb --- old/lib/parallel_tests/gherkin/runtime_logger.rb 2018-09-03 17:54:35.000000000 +0200 +++ new/lib/parallel_tests/gherkin/runtime_logger.rb 2018-11-09 23:00:42.000000000 +0100 @@ -5,22 +5,22 @@ class RuntimeLogger include Io - def initialize(step_mother, path_or_io, options) - @io = prepare_io(path_or_io) + def initialize(config) + @io = prepare_io(config.out_stream) @example_times = Hash.new(0) - end - def before_feature(_) - @start_at = ParallelTests.now.to_f - end + config.on_event :test_case_started do |_| + @start_at = ParallelTests.now.to_f + end - def after_feature(feature) - @example_times[feature.file] += ParallelTests.now.to_f - @start_at - end + config.on_event :test_case_finished do |event| + @example_times[event.test_case.feature.file] += ParallelTests.now.to_f - @start_at + end - def after_features(*args) - lock_output do - @io.puts @example_times.map { |file, time| "#{file}:#{time}" } + config.on_event :test_run_finished do |_| + lock_output do + @io.puts @example_times.map { |file, time| "#{file}:#{time}" } + end end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/parallel_tests/rspec/runtime_logger.rb new/lib/parallel_tests/rspec/runtime_logger.rb --- old/lib/parallel_tests/rspec/runtime_logger.rb 2018-09-03 17:54:35.000000000 +0200 +++ new/lib/parallel_tests/rspec/runtime_logger.rb 2018-11-09 23:00:42.000000000 +0100 @@ -34,7 +34,6 @@ def start_dump(*args) return unless ENV['TEST_ENV_NUMBER'] #only record when running in parallel - # TODO: Figure out why sometimes time can be less than 0 lock_output do @example_times.each do |file, time| relative_path = file.sub(/^#{Regexp.escape Dir.pwd}\//,'').sub(/^\.\//, "") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/parallel_tests/tasks.rb new/lib/parallel_tests/tasks.rb --- old/lib/parallel_tests/tasks.rb 2018-09-03 17:54:35.000000000 +0200 +++ new/lib/parallel_tests/tasks.rb 2018-11-09 23:00:42.000000000 +0100 @@ -14,7 +14,7 @@ def purge_before_load if Gem::Version.new(Rails.version) > Gem::Version.new('4.2.0') - Rake::Task.task_defined?('db:test:purge') ? 'db:test:purge' : 'app:db:test:purge' + Rake::Task.task_defined?('db:purge') ? 'db:purge' : 'app:db:purge' end end @@ -65,10 +65,10 @@ end end - # parallel:spec[:count, :pattern, :options] + # parallel:spec[:count, :pattern, :options, :pass_through] def parse_args(args) # order as given by user - args = [args[:count], args[:pattern], args[:options]] + args = [args[:count], args[:pattern], args[:options], args[:pass_through]] # count given or empty ? # parallel:spec[2,models,options] @@ -77,8 +77,9 @@ num_processes = count.to_i unless count.to_s.empty? pattern = args.shift options = args.shift + pass_through = args.shift - [num_processes, pattern.to_s, options.to_s] + [num_processes, pattern.to_s, options.to_s, pass_through.to_s] end end end @@ -152,11 +153,11 @@ ['test', 'spec', 'features', 'features-spinach'].each do |type| desc "Run #{type} in parallel with parallel:#{type}[num_cpus]" - task type, [:count, :pattern, :options] do |t, args| + task type, [:count, :pattern, :options, :pass_through] do |t, args| ParallelTests::Tasks.check_for_pending_migrations ParallelTests::Tasks.load_lib - count, pattern, options = ParallelTests::Tasks.parse_args(args) + count, pattern, options, pass_through = ParallelTests::Tasks.parse_args(args) test_framework = { 'spec' => 'rspec', 'test' => 'test', @@ -173,7 +174,8 @@ command = "#{ParallelTests.with_ruby_binary(Shellwords.escape(executable))} #{type} --type #{test_framework} " \ "-n #{count} " \ "--pattern '#{pattern}' " \ - "--test-options '#{options}'" + "--test-options '#{options}' " \ + "#{pass_through}" abort unless system(command) # allow to chain tasks e.g. rake parallel:spec parallel:features end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/parallel_tests/test/runner.rb new/lib/parallel_tests/test/runner.rb --- old/lib/parallel_tests/test/runner.rb 2018-09-03 17:54:35.000000000 +0200 +++ new/lib/parallel_tests/test/runner.rb 2018-11-09 23:00:42.000000000 +0100 @@ -78,7 +78,7 @@ cmd = "nice #{cmd}" if options[:nice] cmd = "#{cmd} 2>&1" if options[:combine_stderr] - puts cmd if options[:verbose] + puts cmd if options[:verbose] && !options[:serialize_stdout] execute_command_and_capture_output(env, cmd, options) end @@ -94,6 +94,8 @@ exitstatus = $?.exitstatus seed = output[/seed (\d+)/,1] + output = [cmd, output].join("\n") if options[:verbose] && options[:serialize_stdout] + {:stdout => output, :exit_status => exitstatus, :command => cmd, :seed => seed} end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/parallel_tests/test/runtime_logger.rb new/lib/parallel_tests/test/runtime_logger.rb --- old/lib/parallel_tests/test/runtime_logger.rb 2018-09-03 17:54:35.000000000 +0200 +++ new/lib/parallel_tests/test/runtime_logger.rb 2018-11-09 23:00:42.000000000 +0100 @@ -92,38 +92,4 @@ end end) end -elsif defined?(MiniTest::Unit) # Minitest 4 - MiniTest::Unit.class_eval do - alias_method :_run_suite_without_runtime_log, :_run_suite - def _run_suite(*args) - ParallelTests::Test::RuntimeLogger.log_test_run(args.first) do - _run_suite_without_runtime_log(*args) - end - end - - alias_method :_run_suites_without_runtime_log, :_run_suites - def _run_suites(*args) - result = _run_suites_without_runtime_log(*args) - ParallelTests::Test::RuntimeLogger.unique_log - result - end - end -else # Test::Unit - require 'test/unit/testsuite' - class ::Test::Unit::TestSuite - alias_method :run_without_timing, :run - - def run(result, &block) - test = tests.first - - if test.is_a? ::Test::Unit::TestSuite # all tests ? - run_without_timing(result, &block) - ParallelTests::Test::RuntimeLogger.unique_log - else - ParallelTests::Test::RuntimeLogger.log_test_run(test.class) do - run_without_timing(result, &block) - end - end - end - end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/parallel_tests/version.rb new/lib/parallel_tests/version.rb --- old/lib/parallel_tests/version.rb 2018-09-03 17:54:35.000000000 +0200 +++ new/lib/parallel_tests/version.rb 2018-11-09 23:00:42.000000000 +0100 @@ -1,3 +1,3 @@ module ParallelTests - VERSION = Version = '2.22.1' + VERSION = Version = '2.27.0' end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/parallel_tests.rb new/lib/parallel_tests.rb --- old/lib/parallel_tests.rb 2018-09-03 17:54:35.000000000 +0200 +++ new/lib/parallel_tests.rb 2018-11-09 23:00:42.000000000 +0100 @@ -88,13 +88,8 @@ pids.count end - # real time even if someone messed with timecop in tests def now - if Time.respond_to?(:now_without_mock_time) # Timecop - Time.now_without_mock_time - else - Time.now - end + Process.clock_gettime(Process::CLOCK_MONOTONIC) end def delta diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2018-09-03 17:54:35.000000000 +0200 +++ new/metadata 2018-11-09 23:00:42.000000000 +0100 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: parallel_tests version: !ruby/object:Gem::Version - version: 2.22.1 + version: 2.27.0 platform: ruby authors: - Michael Grosser autorequire: bindir: bin cert_chain: [] -date: 2018-09-03 00:00:00.000000000 Z +date: 2018-11-09 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: parallel @@ -74,7 +74,7 @@ requirements: - - ">=" - !ruby/object:Gem::Version - version: 2.0.0 + version: 2.2.0 required_rubygems_version: !ruby/object:Gem::Requirement requirements: - - ">="