diff --git a/run_syntax_tests.sh b/run_syntax_tests.sh index cfcc875..e148da8 100755 --- a/run_syntax_tests.sh +++ b/run_syntax_tests.sh @@ -14,9 +14,17 @@ # under the License. export SCRIPT_DIR=$(cd `dirname $0` && pwd -P) -export FUTURE_PARSER=${FUTURE_PARSER:-no} source $SCRIPT_DIR/functions +export PUPPET_VERSION=${PUPPET_VERSION:-4} +PUPPET_MAJOR_VERSION=`echo $PUPPET_VERSION | cut -c 1` +export PUPPET_GEM_VERSION="~> $PUPPET_MAJOR_VERSION" +if [ "$PUPPET_MAJOR_VERSION" -lt "4" ]; then + export FUTURE_PARSER=${FUTURE_PARSER:-yes} +else + export FUTURE_PARSER=${FUTURE_PARSER:-no} +fi + install_gems # run unit tests