summaryrefslogtreecommitdiff
path: root/netci.groovy
diff options
context:
space:
mode:
authorBruce Forstall <Bruce_Forstall@msn.com>2019-01-08 11:02:40 -0800
committerBruce Forstall <Bruce_Forstall@msn.com>2019-01-08 11:02:40 -0800
commit491c4ad85ba6cdfde84a45ee00b7b1ea823cd7a3 (patch)
tree0dce1a903e70d08eaa14ebd76186f81aab17f756 /netci.groovy
parentbd5ea1c46ca21631194610f88f2ba420e8982d5b (diff)
downloadcoreclr-491c4ad85ba6cdfde84a45ee00b7b1ea823cd7a3.tar.gz
coreclr-491c4ad85ba6cdfde84a45ee00b7b1ea823cd7a3.tar.bz2
coreclr-491c4ad85ba6cdfde84a45ee00b7b1ea823cd7a3.zip
Update test reports archiving
Two things: 1. Turn "echo" back on after runtests.cmd, so we see in the log file the testReports.zip compression. 2. Change the archiving of testReports.zip to not occur even if the test run fails (this is actually the most interesting case), and don't fail if there is nothing to archive.
Diffstat (limited to 'netci.groovy')
-rwxr-xr-xnetci.groovy11
1 files changed, 9 insertions, 2 deletions
diff --git a/netci.groovy b/netci.groovy
index 906238b5cf..0f6c65096d 100755
--- a/netci.groovy
+++ b/netci.groovy
@@ -2271,11 +2271,14 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
// If we ran the tests, collect the test logs collected by xunit. We want to do this even if the tests fail, so we
// must do it in the same batch file as the test run.
+ buildCommandsStr += "echo on\r\n" // Show the following commands in the log. "echo" doesn't alter the errorlevel.
buildCommandsStr += "set saved_errorlevel=%errorlevel%\r\n"
buildCommandsStr += "powershell -NoProfile -Command \"Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::CreateFromDirectory('.\\bin\\tests\\${osGroup}.${arch}.${configuration}\\Reports', '.\\bin\\tests\\testReports.zip')\"\r\n";
buildCommandsStr += "exit /b %saved_errorlevel%\r\n"
- Utilities.addArchival(newJob, "bin/tests/testReports.zip", "")
+ def doNotFailIfNothingArchived = true
+ def archiveOnlyIfSuccessful = false
+ Utilities.addArchival(newJob, "bin/tests/testReports.zip", "", doNotFailIfNothingArchived, archiveOnlyIfSuccessful)
}
buildCommands += buildCommandsStr
}
@@ -3145,6 +3148,7 @@ def static CreateWindowsArmTestJob(def dslFactory, def project, def architecture
def runtestCommand = "call %WORKSPACE%\\tests\\runtest.cmd ${architecture} ${configuration} skipgeneratelayout"
addCommand("${runtestCommand}")
+ addCommand("echo on") // Show the following commands in the log. "echo" doesn't alter the errorlevel.
addCommand("set saved_errorlevel=%errorlevel%")
// Collect the test logs collected by xunit. Ignore errors here. We want to collect these even if the run
@@ -3161,7 +3165,10 @@ def static CreateWindowsArmTestJob(def dslFactory, def project, def architecture
} // job
if (!isCoreFxScenario(scenario)) {
- Utilities.addArchival(newJob, "bin/tests/testReports.zip", "")
+ def doNotFailIfNothingArchived = true
+ def archiveOnlyIfSuccessful = false
+ Utilities.addArchival(newJob, "bin/tests/testReports.zip", "", doNotFailIfNothingArchived, archiveOnlyIfSuccessful)
+
Utilities.addXUnitDotNETResults(newJob, 'bin/**/TestRun*.xml', true)
}