summaryrefslogtreecommitdiff
path: root/ci/verify-chef.bat
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2016-02-10 14:17:58 -0800
committerJohn Keiser <john@johnkeiser.com>2016-02-10 15:07:12 -0800
commitcd96a4a386e7da079061b60923b98abc7f8e74f5 (patch)
treece8c5f2dc0a41db2cd3c8e71a9bcdd495ee34e3d /ci/verify-chef.bat
parent919aaa7b2669875b79335f80778633c844bf4fa5 (diff)
downloadchef-cd96a4a386e7da079061b60923b98abc7f8e74f5.tar.gz
Create special tempdir and destroy it on each ci run
Diffstat (limited to 'ci/verify-chef.bat')
-rwxr-xr-xci/verify-chef.bat16
1 files changed, 16 insertions, 0 deletions
diff --git a/ci/verify-chef.bat b/ci/verify-chef.bat
index c8f9d3573c..30918b2900 100755
--- a/ci/verify-chef.bat
+++ b/ci/verify-chef.bat
@@ -11,6 +11,18 @@ SET EMBEDDED_BIN_DIR=C:\opscode\%PROJECT_NAME%\embedded\bin
ECHO.
+REM ; Set the temporary directory to a custom location, and wipe it before
+REM ; and after the tests run.
+IF %TEMP% (
+ SET TEMP=%TEMP%\cheftest
+ SET TMP=%TMP%\cheftest
+) ELSE (
+ SET TEMP=%TEMP%\cheftest
+ SET TMP=%TMP%\cheftest
+)
+RMDIR /S /Q %TEMP%
+MKDIR %TEMP%
+
FOR %%b IN (
chef-client
knife
@@ -51,3 +63,7 @@ IF "%PIPELINE_NAME%" == "chef-fips" (
set CHEF_FIPS=1
)
call bundle exec rspec -r rspec_junit_formatter -f RspecJunitFormatter -o %WORKSPACE%\test.xml -f documentation spec/unit spec/functional
+
+REM ; Destroy everything at the end for good measure.
+RMDIR /S /Q %TEMP%
+MKDIR %TEMP%