Skip to content

Commit

Permalink
Skip other spec suites on JRuby 2.0 mode.
Browse files Browse the repository at this point in the history
It appears to be much, much slower. For example, for
rspec-support, the JRuby builds for 1.8 and 1.9 modes
were 3:26 and 3:51, but 9:44 for 2.0 mode. There is
similar slowness for the other repos.
  • Loading branch information
myronmarston committed Jan 9, 2015
1 parent a54a43d commit 2941c17
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 14 deletions.
36 changes: 22 additions & 14 deletions travis/script/functions.sh
Expand Up @@ -55,9 +55,13 @@ function run_cukes {
function run_specs_one_by_one {
echo "Running each spec file, one-by-one..."

for file in `find spec -iname '*_spec.rb'`; do
bin/rspec $file -b --format progress
done
if is_mri; then
for file in `find spec -iname '*_spec.rb'`; do
bin/rspec $file -b --format progress
done
else
echo "Skipping one-by-one specs on non-MRI rubies as they tend to have long boot times"
fi
}

function run_spec_suite_for {
Expand Down Expand Up @@ -114,18 +118,22 @@ function check_style_and_lint {
}

function run_all_spec_suites {
fold "one-by-one specs" run_specs_one_by_one
fold "rspec-core specs" run_spec_suite_for "rspec-core"
fold "rspec-expectations specs" run_spec_suite_for "rspec-expectations"
fold "rspec-mocks specs" run_spec_suite_for "rspec-mocks"

if is_mri; then
fold "rspec-rails specs" run_spec_suite_for "rspec-rails"
if is_jruby_20_mode; then
echo "Skipping other spec suites for JRuby 2.0 mode because it is so much slower"
else
echo "Skipping rspec-rails specs on non-MRI rubies"
fi
fold "one-by-one specs" run_specs_one_by_one
fold "rspec-core specs" run_spec_suite_for "rspec-core"
fold "rspec-expectations specs" run_spec_suite_for "rspec-expectations"
fold "rspec-mocks specs" run_spec_suite_for "rspec-mocks"

if rspec_support_compatible; then
fold "rspec-support specs" run_spec_suite_for "rspec-support"
if is_mri; then
fold "rspec-rails specs" run_spec_suite_for "rspec-rails"
else
echo "Skipping rspec-rails specs on non-MRI rubies"
fi

if rspec_support_compatible; then
fold "rspec-support specs" run_spec_suite_for "rspec-support"
fi
fi
}
8 changes: 8 additions & 0 deletions travis/script/predicate_functions.sh
Expand Up @@ -8,6 +8,14 @@ function is_mri {
fi;
}

function is_jruby_20_mode {
if [ "$JRUBY_OPTS" = "--2.0" ]; then
return 0
else
return 1
fi
}

function is_mri_192 {
if is_mri; then
if ruby -e "exit(RUBY_VERSION == '1.9.2')"; then
Expand Down

0 comments on commit 2941c17

Please sign in to comment.