Add remove_ntp_dhcp option

  * Those option are WA for
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=600661
    WA needed for extremly rare situatuon, when network dhcp provide wrong
    ntp.
  * Those option make sence to use only with dropping 'ntp-servers' request
    from dhclient.conf - unless, you totally remove dhcp client from system
  * Misc: update  run_tests.sh to latest

Change-Id: I8818eed3541f1d7bfc073cc05d8df48d124b812e
diff --git a/tests/pillar/client_auth.sls b/tests/pillar/client_auth.sls
index ebe515e..6c5ca3f 100644
--- a/tests/pillar/client_auth.sls
+++ b/tests/pillar/client_auth.sls
@@ -1,6 +1,7 @@
 ntp:
   client:
     enabled: true
+    remove_dhcp_conf: true
     auth:
       enabled: true
       secrets:
@@ -22,4 +23,4 @@
         key_id: 1
       secondary:
         server: ntp.nic.cz
-        key_id: 2
\ No newline at end of file
+        key_id: 2
diff --git a/tests/pillar/server_auth.sls b/tests/pillar/server_auth.sls
index 9c351c9..8891a40 100644
--- a/tests/pillar/server_auth.sls
+++ b/tests/pillar/server_auth.sls
@@ -15,6 +15,7 @@
           trustedkey: false
     mode7: true
     orphan: 5
+    remove_dhcp_conf: true
     peers:
     - host: 192.168.31.1
     - host: 192.168.31.2
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 7093161..a348912 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -28,6 +28,8 @@
 
 SALT_OPTS="${SALT_OPTS} --retcode-passthrough --local -c ${SALT_CONFIG_DIR} --log-file=/dev/null"
 
+IGNORE_MODELVALIDATE_MASK=${IGNORE_MODELVALIDATE_MASK:-"novalidate"}
+
 if [ "x${SALT_VERSION}" != "x" ]; then
     PIP_SALT_VERSION="==${SALT_VERSION}"
 fi
@@ -154,7 +156,11 @@
 }
 
 prepare() {
-    [ -d ${BUILDDIR} ] && mkdir -p ${BUILDDIR}
+    if [[ -f ${BUILDDIR}/.prepare_done ]]; then
+      log_info "${BUILDDIR}/.prepare_done exist, not rebuilding BUILDDIR"
+      return
+    fi
+    [[ -d ${BUILDDIR} ]] && mkdir -p ${BUILDDIR}
 
     [[ ! -f "${VENV_DIR}/bin/activate" ]] && setup_virtualenv
     setup_mock_bin
@@ -162,6 +168,7 @@
     setup_salt
     install_dependencies
     link_modules
+    touch ${BUILDDIR}/.prepare_done
 }
 
 lint_releasenotes() {
@@ -215,7 +222,7 @@
     salt_run saltutil.clear_cache; salt_run saltutil.refresh_pillar; salt_run saltutil.sync_all;
     for role in ${SCHEMARDIR}/*.yaml; do
       role_name=$(basename "${role%*.yaml}")
-      for pillar in pillar/${role_name}*.sls; do
+      for pillar in $(ls pillar/${role_name}*.sls | grep -v ${IGNORE_MODELVALIDATE_MASK} ); do
         pillar_name=$(basename "${pillar%*.sls}")
         local _message="FORMULA:${FORMULA_NAME} ROLE:${role_name} against PILLAR:${pillar_name}"
         log_info "model_validate ${_message}"