Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit eeca7ed

Browse files
committed
Update scripts (will extract to rspec-dev)
1 parent 1940cf9 commit eeca7ed

File tree

1 file changed

+23
-24
lines changed

1 file changed

+23
-24
lines changed

script/functions.sh

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,31 +44,30 @@ function run_specs_and_record_done {
4444

4545
function run_cukes {
4646
if [ -d features ]; then
47-
# force jRuby to use client mode JVM or a compilation mode thats as close as possible,
48-
# idea taken from https://github.com/jruby/jruby/wiki/Improving-startup-time
49-
#
50-
# Note that we delay setting this until we run the cukes because we've seen
51-
# spec failures in our spec suite due to problems with this mode.
52-
export JAVA_OPTS='-client -XX:+TieredCompilation -XX:TieredStopAtLevel=1'
53-
54-
echo "${PWD}/bin/cucumber"
55-
56-
if is_mri_192; then
57-
# For some reason we get SystemStackError on 1.9.2 when using
58-
# the bin/cucumber approach below. That approach is faster
59-
# (as it avoids the bundler tax), so we use it on rubies where we can.
60-
bundle exec cucumber --strict
61-
elif is_jruby; then
62-
# For some reason JRuby doesn't like our improved bundler setup
63-
RUBYOPT="-I${PWD}/../bundle -rbundler/setup" \
64-
PATH="${PWD}/bin:$PATH" \
65-
bin/cucumber --strict
47+
if is_ruby_25_plus; then
48+
echo "${PWD}/bin/cucumber"
49+
50+
if is_jruby; then
51+
# force jRuby to use client mode JVM or a compilation mode thats as close as possible,
52+
# idea taken from https://github.com/jruby/jruby/wiki/Improving-startup-time
53+
#
54+
# Note that we delay setting this until we run the cukes because we've seen
55+
# spec failures in our spec suite due to problems with this mode.
56+
export JAVA_OPTS='-client -XX:+TieredCompilation -XX:TieredStopAtLevel=1'
57+
58+
# For some reason JRuby doesn't like our improved bundler setup
59+
RUBYOPT="-I${PWD}/../bundle -rbundler/setup" \
60+
PATH="${PWD}/bin:$PATH" \
61+
bin/cucumber --strict
62+
else
63+
# Prepare RUBYOPT for scenarios that are shelling out to ruby,
64+
# and PATH for those that are using `rspec` or `rake`.
65+
RUBYOPT="${RUBYOPT} -I${PWD}/../bundle -rbundler/setup" \
66+
PATH="${PWD}/bin:$PATH" \
67+
bin/cucumber --strict
68+
fi
6669
else
67-
# Prepare RUBYOPT for scenarios that are shelling out to ruby,
68-
# and PATH for those that are using `rspec` or `rake`.
69-
RUBYOPT="${RUBYOPT} -I${PWD}/../bundle -rbundler/setup" \
70-
PATH="${PWD}/bin:$PATH" \
71-
bin/cucumber --strict
70+
echo "skipping features"
7271
fi
7372
fi
7473
}

0 commit comments

Comments
 (0)