Skip to content

Commit

Permalink
parallel_spec_standalone: use --format progress
Browse files Browse the repository at this point in the history
For the past decade, people used a .rspec_parallel to configure this. We
can set it directly in the rake task. That enables us to remove the
.rspec_parallel and ultimately reduces the number of files required for
pdk update/modulesync.
  • Loading branch information
bastelfreak committed Apr 9, 2024
1 parent e7173ab commit d8f1389
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/puppetlabs_spec_helper/rake_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,13 @@
warn 'No files for parallel_spec to run against'
else

args = ['-t', 'rspec']
args.push('--').concat(ENV['CI_SPEC_OPTIONS'].strip.split).push('--') unless ENV['CI_SPEC_OPTIONS'].nil? || ENV['CI_SPEC_OPTIONS'].strip.empty?
args = ['--type', 'rspec']
additional_options = if ENV['CI_SPEC_OPTIONS'].nil? || ENV['CI_SPEC_OPTIONS'].strip.empty?
['--format', 'progress']

Check warning on line 116 in lib/puppetlabs_spec_helper/rake_tasks.rb

View check run for this annotation

Codecov / codecov/patch

lib/puppetlabs_spec_helper/rake_tasks.rb#L114-L116

Added lines #L114 - L116 were not covered by tests
else
ENV['CI_SPEC_OPTIONS'].strip.split + ['--format', 'progress']

Check warning on line 118 in lib/puppetlabs_spec_helper/rake_tasks.rb

View check run for this annotation

Codecov / codecov/patch

lib/puppetlabs_spec_helper/rake_tasks.rb#L118

Added line #L118 was not covered by tests
end
args.push('--').concat(additional_options).push('--')

Check warning on line 120 in lib/puppetlabs_spec_helper/rake_tasks.rb

View check run for this annotation

Codecov / codecov/patch

lib/puppetlabs_spec_helper/rake_tasks.rb#L120

Added line #L120 was not covered by tests
args.concat(Rake::FileList[pattern].to_a)

ParallelTests::CLI.new.run(args)
Expand Down

0 comments on commit d8f1389

Please sign in to comment.