Allow run_tests.sh to be rerun

This updates the return code checking to allow for rerunning of the
script when the puppet fails. Previously it would error out if puppet
returned 0 when there were no changes which is not correct. This change
updates the return code check for puppet to include 0 and 2 for the
repo configuration and initial puppet run.
Change-Id: I5252b7561ea589f3f49f7f6b43269328b326aa7e
This commit is contained in:
Alex Schultz
2016年07月13日 10:22:40 -06:00
parent 1bbcc95839
commit d029bb4d95

View File

@@ -102,7 +102,8 @@ set +e
if [ "${MANAGE_REPOS}" = true ]; then
print_header 'Install repos'
$SUDO $PUPPET_FULL_PATH apply $PUPPET_ARGS -e "include ::openstack_integration::repos"
if [ $? -ne 2 ]; then
RESULT=$?
if [ $RESULT -ne 0 ] && [ $RESULT -ne 2 ]; then
print_header 'Puppet failed to install repositories.'
exit 1
fi
@@ -112,7 +113,7 @@ print_header "Running Puppet Scenario: ${SCENARIO} (1st time)"
run_puppet $SCENARIO
RESULT=$?
set -e
if [ $RESULT -ne 2 ]; then
if [ $RESULT -ne 0 ] && [ $RESULT -ne 2 ]; then
print_header 'First Puppet run contains errors in catalog.'
print_header 'SELinux Alerts (1st time)'
catch_selinux_alerts
Reference in New Issue
openstack/puppet-openstack-integration
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.