Skip to content

Commit

Permalink
Redirect the temp folder when running Windows tests (#1145)
Browse files Browse the repository at this point in the history
This allows the temp files created during testing to be easily deleted with the rest of the Jenkins workspace.
  • Loading branch information
fealebenpae committed Jan 12, 2017
1 parent c86a4b5 commit 9103a41
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Jenkinsfile
Expand Up @@ -224,10 +224,13 @@ def Win32Test(stashName) {
def nunit = "${env.WORKSPACE}\\packages\\NUnit.ConsoleRunner.3.2.1\\tools\\nunit3-console.exe"
dir("Platform.Win32/Tests.Win32/bin/${configuration}") {
try {
bat """
"${nunit}" Tests.Win32.dll --result=TestResults.win32-x86.xml;transform=nunit3-junit.xslt --x86
"${nunit}" Tests.Win32.dll --result=TestResults.win32-x64.xml;transform=nunit3-junit.xslt
"""
withEnv(["TMP=${env.WORKSPACE}\\temp"]) {
bat """
mkdir "%TMP%"
"${nunit}" Tests.Win32.dll --result=TestResults.win32-x86.xml;transform=nunit3-junit.xslt --x86
"${nunit}" Tests.Win32.dll --result=TestResults.win32-x64.xml;transform=nunit3-junit.xslt
"""
}
} finally {
junit 'TestResults.*.xml'
}
Expand Down Expand Up @@ -392,4 +395,4 @@ def xbuildSafe(String command) {
throw err
}
}
}
}

0 comments on commit 9103a41

Please sign in to comment.