Skip to content

Instantly share code, notes, and snippets.

@kbarber
Created January 14, 2014 14:17
Show Gist options
  • Select an option

  • Save kbarber/8418957 to your computer and use it in GitHub Desktop.

Select an option

Save kbarber/8418957 to your computer and use it in GitHub Desktop.
#!/bin/bash -e
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
rvm use $ruby$gemset
# Remove old vendor directory to ensure we have a clean slate
if [ -d "vendor" ];
then
rm -rf vendor
fi
# Lets install the gems in bundle
bundle install --path vendor/bundle
echo "**********************************************"
echo "RUNNING SPECS; PARAMS FROM UPSTREAM BUILD:"
echo ""
echo "PUPPETDB_BRANCH: ${PUPPETDB_BRANCH}"
echo "**********************************************"
(
cd vendor
git clone --depth 1 git://github.com/puppetlabs/facter.git
# Checkout Puppet branch
git clone --depth 1 --branch ${puppet_branch} git://github.com/puppetlabs/puppet.git
git clone --depth 1 git://github.com/puppetlabs/puppetlabs_spec_helper.git
)
export RUBYLIB=$RUBYLIB:`pwd`/vendor/facter/lib/:`pwd`/vendor/puppet/lib/:`pwd`/vendor/puppetlabs_spec_helper/lib
cat >/tmp/force_gc.rb <<RUBY
def GC.disable; end
class RSpec::Core::Configuration
def exclusion_filter=(filter)
settings[:exclusion_filter].merge!(filter)
end
end
RUBY
cd puppet
bundle exec rspec spec -r /tmp/force_gc.rb -fd --tag "~@fails_on_${ruby/-/_}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment