Skip to content

Commit e721e1f

Browse files
committed
[Build] Further refine test result collection to consider reruns
Delete the test results of previous runs of the same test configurations for the same build, i.e. if a test was run again.
1 parent 5a7328b commit e721e1f

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

JenkinsJobs/Releng/collectTestResults.jenkinsfile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,28 @@ pipeline {
5050
testResultsDir="${buildDirectory}/testresults"
5151
mkdir -p "${testResultsDir}"
5252

53-
# Fetch previously collected test results and already generated files (that would otherwise be re-generated)
54-
allTestResultsXMLDirectory="${EP_ECLIPSE_DROPS}/${buildID}/testresults/xml"
55-
if ssh [email protected] "[ -d '${allTestResultsXMLDirectory}' ]"; then
56-
rsync -avzh --exclude="*_${triggeringJob}_*" [email protected]:${allTestResultsXMLDirectory} ${buildDirectory}/testresults
57-
else
58-
echo 'Test results of other configurations not yet published.'
59-
fi
60-
6153
# ==========================================
6254
# Collect results and overview from test-job
6355
pushd "${testResultsDir}"
6456

6557
curl -L -o "${triggeringJob}.xml" "${buildURL}/testReport/api/xml?tree=failCount,passCount,skipCount,duration"
6658
curl -L -o results.zip "${buildURL}/artifact/workarea/${buildID}/eclipse-testing/results/*zip*/results.zip"
6759
unzip results.zip
68-
# copy them to the expected location (from the subfolder of the zip) (mv can't merge directories) and remove all download artifacts.
69-
cp -r results/* .
60+
# copy them to the expected location (from the subfolder of the zip) and remove all download artifacts.
61+
mv results/* .
7062
rm -rf results results.zip
7163
popd
7264

65+
# Fetch previously collected test results and already generated files (that would otherwise be re-generated)
66+
allTestResultsDirectory="${EP_ECLIPSE_DROPS}/${buildID}/testresults"
67+
if ssh [email protected] "[ -d '${allTestResultsDirectory}' ]"; then
68+
# First delete result files from a previous run of the same configuration (in case that test configuration was run again).
69+
ssh [email protected] rm -rfv ${allTestResultsDirectory}/${triggeringJob}* ${allTestResultsDirectory}/*/*${triggeringJob}*
70+
rsync -avzh [email protected]:${allTestResultsDirectory}/xml ${buildDirectory}/testresults
71+
else
72+
echo 'Test results of other configurations not yet published.'
73+
fi
74+
7375
#triggering ant runner
7476
devworkspace=${WORKSPACE}/workspace-updateTestResults
7577

0 commit comments

Comments
 (0)