Skip to content

Commit

Permalink
Restore support for passing custom command lines as PARALLEL_TESTS_EX…
Browse files Browse the repository at this point in the history
…ECUTABLE.
  • Loading branch information
deivid-rodriguez committed Sep 9, 2024
1 parent 7584bfd commit 103e3e7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### Fixed

- Restore support for passing custom command lines as PARALLEL_TESTS_EXECUTABLE.

## 4.7.1 - 2024-04-25

### Added
Expand Down
2 changes: 1 addition & 1 deletion lib/parallel_tests/test/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def command_with_seed(cmd, seed)

def executable
if (executable = ENV['PARALLEL_TESTS_EXECUTABLE'])
[executable]
Shellwords.shellsplit(executable)
else
determine_executable
end
Expand Down
6 changes: 6 additions & 0 deletions spec/parallel_tests/test/runner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ def call(*args)
expect(a).to include("script/custom_rspec")
end
call(['xxx'], 1, 22, {})

ENV['PARALLEL_TESTS_EXECUTABLE'] = 'ruby -Icustom_option script/custom_rspec'
expect(ParallelTests::Test::Runner).to receive(:execute_command) do |a, _, _, _d|
expect(a).to include("ruby", "-Icustom_option", "script/custom_rspec")
end
call(['xxx'], 1, 22, {})
end

it "uses options" do
Expand Down

0 comments on commit 103e3e7

Please sign in to comment.