Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Updates from rspec-dev (2014-01-25) #1266

Merged
merged 2 commits into from

1 participant

@myronmarston

These are some updates, generated from rspec-dev's rake tasks.

@myronmarston myronmarston merged commit 1984c6c into master
@myronmarston myronmarston deleted the update-travis-build-scripts-2014-01-25 branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 25, 2014
  1. @myronmarston
Commits on Jan 26, 2014
  1. @myronmarston
This page is out of date. Refresh to see the latest.
View
3  .travis.yml
@@ -1,4 +1,4 @@
-# This file was generated on 2014-01-24T19:39:30-08:00 from the rspec-dev repo.
+# This file was generated on 2014-01-25T09:32:04-08:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
before_install: "script/clone_all_rspec_repos"
@@ -21,4 +21,3 @@ matrix:
- rvm: jruby-head
- rvm: ruby-head
fast_finish: true
-
View
1  maintenance-branch
@@ -0,0 +1 @@
+master
View
1  maintenence-branch
@@ -1 +0,0 @@
-master
View
2  script/clone_all_rspec_repos
@@ -1,5 +1,5 @@
#!/bin/bash
-# This file was generated on 2014-01-24T19:39:30-08:00 from the rspec-dev repo.
+# This file was generated on 2014-01-25T09:32:04-08:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
set -e -x
View
17 script/functions.sh
@@ -1,10 +1,10 @@
-# This file was generated on 2014-01-24T19:39:30-08:00 from the rspec-dev repo.
+# This file was generated on 2014-01-25T09:32:04-08:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
# idea taken from: http://blog.headius.com/2010/03/jruby-startup-time-tips.html
export JRUBY_OPTS='-X-C' # disable JIT since these processes are so short lived
SPECS_HAVE_RUN_FILE=specs.out
-MAINTENENCE_BRANCH=`cat maintenence-branch`
+MAINTENANCE_BRANCH=`cat maintenance-branch`
BUNDLE_INSTALL_FLAGS=`cat .travis.yml | grep bundler_args | tr -d '"' | grep -o " .*"`
# Taken from:
@@ -54,12 +54,20 @@ function is_mri_192 {
function clone_repo {
if [ ! -d $1 ]; then # don't clone if the dir is already there
- travis_retry git clone git://github.com/rspec/$1 --depth 1 --branch $MAINTENENCE_BRANCH
+ travis_retry git clone git://github.com/rspec/$1 --depth 1 --branch $MAINTENANCE_BRANCH
fi;
}
function run_specs_and_record_done {
- bin/rspec spec --backtrace --format progress --profile --format progress --out $SPECS_HAVE_RUN_FILE
+ local rspec_bin=bin/rspec
+
+ # rspec-core needs to run with a special script that loads simplecov first,
+ # so that it can instrument rspec-core's code before rspec-core has been loaded.
+ if [ -f script/rspec_with_simplecov ]; then
+ rspec_bin=script/rspec_with_simplecov
+ fi;
+
+ $rspec_bin spec --backtrace --format progress --profile --format progress --out $SPECS_HAVE_RUN_FILE
}
function run_cukes {
@@ -104,4 +112,3 @@ function run_spec_suite_for {
popd
fi;
}
-
View
5 script/rspec_with_simplecov
@@ -2,6 +2,11 @@
# This is necessary for when `--standalone` is being used.
$:.unshift File.expand_path '../../bundle', __FILE__
+
+# For the travis build we put the bundle directory up a directory
+# so it can be shared among the repos for faster bundle installs.
+$:.unshift File.expand_path '../../../bundle', __FILE__
+
require 'bundler/setup'
# To use simplecov while running rspec-core's test suite, we must
View
3  script/run_build
@@ -1,5 +1,5 @@
#!/bin/bash
-# This file was generated on 2014-01-24T19:39:30-08:00 from the rspec-dev repo.
+# This file was generated on 2014-01-25T09:32:04-08:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
set -e -x
@@ -17,4 +17,3 @@ if is_mri; then
else
echo "Skipping the rest of the build on non-MRI rubies"
fi
-
View
80 script/test_all
@@ -1,80 +0,0 @@
-#!/bin/bash
-
-set -e -x
-
-function is_jruby() {
- if ruby -e 'exit RUBY_PLATFORM == "java"'; then
- return 0
- else
- return 1
- fi
-}
-
-# idea taken from: http://blog.headius.com/2010/03/jruby-startup-time-tips.html
-export JRUBY_OPTS='-X-C' # disable JIT since these processes are so short lived
-
-echo "Running all..."
-script/rspec_with_simplecov spec -b --format progress --profile
-
-echo
-echo "--------------------------------------------------------------------"
-echo
-
-if is_jruby; then
- echo "Skipping one-by-one spec runs due to expensive JVM load time"
-else
- for file in `find spec -iname '*_spec.rb'`; do
- bin/rspec $file -b --format progress
- done
-fi
-
-# force jRuby to use client mode JVM or a compilation mode thats as close as possible,
-# idea taken from https://github.com/jruby/jruby/wiki/Improving-startup-time
-export JAVA_OPTS='-client -XX:+TieredCompilation -XX:TieredStopAtLevel=1'
-
-# Prepare RUBYOPT for scenarios that are shelling out to ruby,
-# and PATH for those that are using `rspec` or `rake`.
-# RUBYOPT="-I${PWD}/bundle -rbundler/setup" \
-# PATH="${PWD}/bin:$PATH" \
-# bin/cucumber
-
-# For now, use this instead, due to a bug in bundler:
-# https://github.com/carlhuda/bundler/issues/2382
-bundle exec bin/cucumber --strict
-
-script/prevent_runtime_method_cache_busters
-
-# Test against other RSpec gems.
-unset BUNDLE_GEMFILE
-
-# Delete the directory for idempotency when running locally
-export TMPDIR="/tmp"
-rm -rf $TMPDIR/rspec-ci
-mkdir $TMPDIR/rspec-ci
-
-# Get the branch to test against
-MAINTENENCE_BRANCH=`cat maintenence-branch`
-
-cp -r "./" "$TMPDIR/rspec-ci/rspec-core"
-
-#Change to the CI directory
-cd $TMPDIR/rspec-ci
-
-# The steps to test the gems are the same, this function does them.
-function test_gem {
- git clone git://github.com/rspec/rspec-$1 --depth 1
- cd rspec-$1
- pwd
- git fetch origin
- git checkout $MAINTENENCE_BRANCH
- git branch
- bundle_flags=`cat .travis.yml | grep bundler_args | tr -d '"' | grep -o " .*"`
-
- bundle install $bundle_flags
- bin/rspec -b
- cd ../
-}
-
-# Test rspec-mocks and rspec-expectations.
-test_gem "mocks"
-test_gem "expectations"
Something went wrong with that request. Please try again.