-
-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #637 from cucumber/fix-jruby-builds
Fix JRuby builds
- Loading branch information
Showing
16 changed files
with
94 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
--color | ||
--format Fuubar | ||
--order random | ||
--warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,6 @@ | ||
<% | ||
$LOAD_PATH << ::File.expand_path('../lib', __FILE__) | ||
require 'aruba/version' | ||
require 'ffi' | ||
java_version = (RUBY_DESCRIPTION.match(/.*?on.*?(1\.[\d]\..*? )/))[1] if defined?(JRUBY_VERSION) | ||
std_opts = "--format pretty --color --exclude features/fixtures --require features --tags ~@unsupported-on" | ||
java_default_opts = "--tags ~@wip-jruby-java-1.6" if defined?(JRUBY_VERSION) && (java_version < '1.7.0') | ||
java_wip_opts = "--tags @wip-jruby-java-1.6:3" if defined?(JRUBY_VERSION) && (java_version < '1.7.0') | ||
ignore_opts = [] | ||
ignore_opts << '--tags ~@ignore' | ||
ignore_opts = ignore_opts.join(' ') | ||
std_opts = "--format pretty --color --exclude features/fixtures --require features --tags ~@unsupported-on" | ||
ignore_opts = '--tags ~@ignore' | ||
%> | ||
default: <%= std_opts %> --tags ~@wip <%= java_default_opts %> <%= ignore_opts %> | ||
wip: <%= std_opts %> --wip --tags @wip:3 <%= java_wip_opts %> <%= ignore_opts %> | ||
default: <%= std_opts %> --tags ~@wip <%= ignore_opts %> | ||
wip: <%= std_opts %> --wip --tags @wip:3 <%= ignore_opts %> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
# @note this file is loaded in env.rb to setup simplecov using RUBYOPTs for child processes and @in-process | ||
require 'simplecov' | ||
# @note this file is loaded in env.rb to setup simplecov using RUBYOPTs for | ||
# child processes and @in-process | ||
unless RUBY_PLATFORM.include?('java') | ||
require 'simplecov' | ||
|
||
root = File.expand_path('../../../', __FILE__) | ||
root = File.expand_path('../../../', __FILE__) | ||
|
||
SimpleCov.command_name(ENV['SIMPLECOV_COMMAND_NAME']) | ||
SimpleCov.root(root) | ||
load File.join(root, '.simplecov') | ||
SimpleCov.command_name(ENV['SIMPLECOV_COMMAND_NAME']) | ||
SimpleCov.root(root) | ||
load File.join(root, '.simplecov') | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# From https://itshouldbeuseful.wordpress.com/2010/11/10/find-your-slowest-running-cucumber-features/ | ||
|
||
scenario_times = {} | ||
|
||
Around do |scenario, block| | ||
name = "#{scenario.feature.file}::#{scenario.name}" | ||
start = Time.now | ||
block.call | ||
end_time = Time.now | ||
scenario_times[name] = end_time - start | ||
end | ||
|
||
at_exit do | ||
max_scenarios = scenario_times.size > 20 ? 20 : scenario_times.size | ||
puts "------------- Top #{max_scenarios} slowest scenarios -------------" | ||
sorted_times = scenario_times.sort { |a, b| b[1] <=> a[1] } | ||
sorted_times[0..max_scenarios - 1].each do |key, value| | ||
puts format("%.2f %s", value, key) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.