<commit_before>#!/bin/bash

if [ -f /usr/bin/yum ]; then
    OS_TYPE='centos7'
elif [ -f /usr/bin/apt-get ]; then
    OS_TYPE='trusty'
fi

#yum -y install redhat-lsb-core
sudo yum -y install ruby-devel rubygems gcc gcc-c++ zlib-devel 

sudo gem install bundler --no-rdoc --no-ri --verbose
mkdir .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems
bundle install
export BEAKER_set=nodepool-$OS_TYPE
export BEAKER_debug=yes
bundle exec rake spec<commit_msg>workaround concat/apt too new version issues<commit_after>#!/bin/bash

if [ -f /usr/bin/yum ]; then
    OS_TYPE='centos7'
elif [ -f /usr/bin/apt-get ]; then
    OS_TYPE='trusty'
fi

sudo yum-config-manager --enable rhel-7-server-optional-rpms
#yum -y install redhat-lsb-core
sudo yum -y install ruby-devel rubygems gcc gcc-c++ zlib-devel 

sudo gem install bundler --no-rdoc --no-ri --verbose
mkdir .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems
bundle install
export BEAKER_set=nodepool-$OS_TYPE
export BEAKER_debug=yes

#bundle exec rspec spec/acceptance
#bundle exec rake spec


# workaround the following:
#  https://github.com/openstack/puppet-openstack-integration/commit/2b57a24d35a833ce543e139c2d04bcb229d1a0be
#  https://github.com/openstack/puppet-openstack-integration/commit/c87bea7761f3ef50fb05bf934ec5842edd989a88

bundle exec rake spec_clean
bundle exec rake spec_prep
pushd spec/fixtures/modules/concat
git checkout 5c4a9141d08a7b23dcada029d23b82590632d0f4
popd
pushd spec/fixtures/modules/apt
git checkout 3f6863ac4c97f834bebc811852452b073d202682
popd
bundle exec rake spec_standalone
{'fraction_non_alphanumeric': 0.09890815671162492, 'fraction_numerical': 0.0674373795761079, 'mean_word_length': 4.813432835820896, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5464380', 'n_tokens_mistral': 687, 'n_tokens_neox': 600, 'n_words': 133}