Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/knapsack/runners/cucumber_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ def self.run(args)
Knapsack.logger.info allocator.leftover_node_tests
Knapsack.logger.info

# NOTE: return if there are no specs to execute for this node.
# This can occurr if test_file_list_source_file is used with less then CI_NODES specs
return Knapsack.logger.warn('No specs to execute') if allocator.stringify_node_tests.empty?

cmd = %Q[bundle exec cucumber #{args} --require #{allocator.test_dir} -- #{allocator.stringify_node_tests}]

system(cmd)
Expand Down
4 changes: 4 additions & 0 deletions lib/knapsack/runners/minitest_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ def self.run(args)
Knapsack.logger.info allocator.leftover_node_tests
Knapsack.logger.info

# NOTE: return if there are no specs to execute for this node.
# This can occurr if test_file_list_source_file is used with less then CI_NODES specs
return Knapsack.logger.warn('No specs to execute') if allocator.stringify_node_tests.empty?

task_name = 'knapsack:minitest_run'

if Rake::Task.task_defined?(task_name)
Expand Down
4 changes: 4 additions & 0 deletions lib/knapsack/runners/rspec_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ def self.run(args)
Knapsack.logger.info allocator.leftover_node_tests
Knapsack.logger.info

# NOTE: return if there are no specs to execute for this node.
# This can occurr if test_file_list_source_file is used with less then CI_NODES specs
return Knapsack.logger.warn('No specs to execute') if allocator.stringify_node_tests.empty?

cmd = %Q[bundle exec rspec #{args} --default-path #{allocator.test_dir} -- #{allocator.stringify_node_tests}]

exec(cmd)
Expand Down
4 changes: 4 additions & 0 deletions lib/knapsack/runners/spinach_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ def self.run(args)
Knapsack.logger.info allocator.leftover_node_tests
Knapsack.logger.info

# NOTE: return if there are no specs to execute for this node.
# This can occurr if test_file_list_source_file is used with less then CI_NODES specs
return Knapsack.logger.warn('No specs to execute') if allocator.stringify_node_tests.empty?

cmd = %Q[bundle exec spinach #{args} --features_path #{allocator.test_dir} -- #{allocator.stringify_node_tests}]

system(cmd)
Expand Down