diff options
author | Feng Pan <fpan@redhat.com> | 2016-11-07 19:22:21 -0500 |
---|---|---|
committer | Feng Pan <fpan@redhat.com> | 2016-11-21 21:27:09 -0500 |
commit | 9326e4237f4d161f297dc4493ab4928ea6e2bf0f (patch) | |
tree | 25372fa964fe84b160c5bfc58304285902edbefc /scripts/ci-unit-tests.sh | |
parent | c70bea9fb9cd5dfb29d7ab8f7aaae7324c31f1e3 (diff) |
Initial Commit.
Change-Id: I212ec4be42357edddd931e9e479e33131ccd4bac
Signed-off-by: Feng Pan <fpan@redhat.com>
Diffstat (limited to 'scripts/ci-unit-tests.sh')
-rwxr-xr-x | scripts/ci-unit-tests.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/ci-unit-tests.sh b/scripts/ci-unit-tests.sh new file mode 100755 index 0000000..a8d57ff --- /dev/null +++ b/scripts/ci-unit-tests.sh @@ -0,0 +1,19 @@ +#!/bin/bash -xe + +if [ "$#" -ne 1 ]; then + echo "Usage: $0 <puppet_version>" + exit 1 +fi + +puppet_version=$1 +if [ "$puppet_version" != "latest" ]; then + export PUPPET_GEM_VERSION="~> $puppet_version.0" +fi + +mkdir .bundled_gems +export GEM_HOME=`pwd`/.bundled_gems +gem install bundler --no-rdoc --no-ri --verbose +$GEM_HOME/bin/bundle install --retry 3 +$GEM_HOME/bin/bundle exec rake syntax +$GEM_HOME/bin/bundle exec rake lint +$GEM_HOME/bin/bundle exec rake spec SPEC_OPTS='--format documentation' |