Sha256: c2906bf320d80a5fd41820f49202b290f485a67c6515068f9ae154791fff220e

Contents?: true

Size: 1.22 KB

Versions: 1

Compression:

Stored size: 1.22 KB

Contents

#!/bin/bash

set -e -x

# 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

# 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'

echo "Running rspec specs"
bin/rspec spec --format progress --profile

echo "Running cucumber specs"

if [ -z ${BRANCH+" is set"} ]; then
  echo "BRANCH must be set for this script."
  exit 1
else
  echo "Using $BRANCH"
fi

if ruby -e "exit(defined?(RUBY_PLATFORM) && RUBY_PLATFORM == 'java')"; then
  # This is JRUBY which requires this one weird path trick...
  PATH="${PWD}/bin:$PATH" \
  bundle exec cucumber --strict
elif ruby -e "exit(RUBY_VERSION.to_f >= 3.4)"; then
  # This is a monkey patch to fix an issue with cucumber using outdated hash syntax, remove when cucumber is updated or ruby 3.4 released
  sed -i '$i\class Hash; alias :__initialize :initialize; def initialize(*args, **_kw, &block) = __initialize(*args, &block); end' bin/cucumber
  bin/cucumber --strict
else
  bundle exec cucumber --strict
fi;

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rspec-its-2.0.0 script/test_all