Revert "Initial run_tests.sh script"

This reverts commit 2921e36c79.

Change-Id: I88055528d143325457cdc2461dedb37f703374b9
This commit is contained in:
Emilien Macchi 2015-08-07 09:21:41 -04:00
parent 9b8367d128
commit 8b9db6da86
4 changed files with 15 additions and 55 deletions

4
.gitignore vendored
View File

@ -1,4 +0,0 @@
Gemfile.lock
.bundle/
.bundled_gems/
.modules/

View File

@ -1,7 +1,5 @@
source ENV['GEM_SOURCE'] || "https://rubygems.org" source ENV['GEM_SOURCE'] || "https://rubygems.org"
gem 'r10k'
group :development, :test do group :development, :test do
gem 'puppetlabs_spec_helper', :require => 'false' gem 'puppetlabs_spec_helper', :require => 'false'
gem 'rspec-puppet', '~> 2.2.0', :require => 'false' gem 'rspec-puppet', '~> 2.2.0', :require => 'false'
@ -20,10 +18,14 @@ end
if facterversion = ENV['FACTER_GEM_VERSION'] if facterversion = ENV['FACTER_GEM_VERSION']
gem 'facter', facterversion, :require => false gem 'facter', facterversion, :require => false
else
gem 'facter', :require => false
end end
if puppetversion = ENV['PUPPET_GEM_VERSION'] if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion, :require => false gem 'puppet', puppetversion, :require => false
else
gem 'puppet', :require => false
end end
# vim:ft=ruby # vim:ft=ruby

View File

@ -1,17 +1,19 @@
#!/bin/bash -ex #!/bin/bash
export SCRIPT_DIR=$(pwd) set -ex
export PUPPETFILE_DIR=${SCRIPT_DIR}/.modules
export SCRIPT_DIR=$(readlink -f "$(dirname $0)")
export PUPPETFILE_DIR=/etc/puppet/modules
install_external() { install_external() {
PUPPETFILE=${SCRIPT_DIR}/Puppetfile1 ${GEM_HOME}/bin/r10k puppetfile install -v PUPPETFILE=${SCRIPT_DIR}/Puppetfile1 r10k puppetfile install -v
} }
install_openstack() { install_openstack() {
cat > clonemap.yaml <<EOF cat > clonemap.yaml <<EOF
clonemap: clonemap:
- name: '(.*?)/puppet-(.*)' - name: '(.*?)/puppet-(.*)'
dest: '$PUPPETFILE_DIR/\2' dest: '/etc/puppet/modules/\2'
EOF EOF
local project_names=$(awk '{ if ($1 == ":git") print $3 }' \ local project_names=$(awk '{ if ($1 == ":git") print $3 }' \
@ -26,9 +28,11 @@ EOF
} }
install_all() { install_all() {
PUPPETFILE=${SCRIPT_DIR}/Puppetfile ${GEM_HOME}/bin/r10k puppetfile install -v PUPPETFILE=${SCRIPT_DIR}/Puppetfile r10k puppetfile install -v
} }
gem install r10k --no-ri --no-rdoc
# If zuul-cloner is there, have it install modules using zuul refs # If zuul-cloner is there, have it install modules using zuul refs
if [ -e /usr/zuul-env/bin/zuul-cloner ] ; then if [ -e /usr/zuul-env/bin/zuul-cloner ] ; then
csplit ${SCRIPT_DIR}/Puppetfile /'External modules'/ \ csplit ${SCRIPT_DIR}/Puppetfile /'External modules'/ \
@ -40,4 +44,4 @@ else
install_all install_all
fi fi
puppet module list --color=false puppet module list

View File

@ -1,42 +0,0 @@
#!/bin/bash -e
# Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
if [ -z $GEM_HOME ]; then
echo "Warning! \$GEM_HOME is not set"
echo ""
echo "In order to properly run the integration tests, please run the"
echo "following:"
echo ""
echo " $ export GEM_HOME=\`pwd\`/.bundled_gems"
exit 1
fi
if ! [ -f $GEM_HOME ]; then
mkdir -p $GEM_HOME
fi
BUNDLE=${GEM_HOME}/bin/bundle
if ! [ -f ${BUNDLE} ]; then
echo "Warning! bundler is not installed"
echo ""
echo "Please run the following to install bundler:"
echo " $ gem install bundler"
exit 1
fi
${BUNDLE} install --no-color --without development test system_tests
./install_modules.sh