system-config/tools/test_puppet_apply.sh
James E. Blair ade79eb3f2 Remove -e from apply test applier
The script that is run by find on each apply test file has -e set,
yet, it attempts to save the exit code from puppet apply and keep
running even in error.  Remove -e so that it does not immediately
exit and can continue as designed.

Change-Id: I1a24e80f42be8d028ecc3eb02df54b49f811fff4
2015-07-08 16:30:59 -07:00

25 lines
839 B
Bash
Executable File

#!/bin/bash -ux
# Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# 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.
file=$1
fileout=${file}.out
echo "##" > $fileout
cat $file > $fileout
sudo puppet apply --modulepath=${MODULE_PATH} --color=false --noop --verbose --debug $file >/dev/null 2>> $fileout
ret=$?
cat $fileout
exit $ret