Skip to content

Commit

Permalink
[jenkins]: analyze all test reports for sonic-mgmt pytests (sonic-net#93
Browse files Browse the repository at this point in the history
)

Signed-off-by: Guohan Lu <lguohan@gmail.com>
  • Loading branch information
lguohan authored Apr 2, 2020
1 parent 1eaca24 commit 8525691
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion jenkins/vs/buildimage-vs-image-201911-test/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pipeline {
post {

always {
junit(allowEmptyResults: true, keepLongStdio: true, testResults: 'sonic-mgmt/tests/results/tr*.xml')
junit(allowEmptyResults: true, keepLongStdio: true, testResults: 'sonic-mgmt/tests/results/**/*.xml')
archiveArtifacts(artifacts: 'sonic-mgmt/tests/results/**, sonic-mgmt/tests/logs/**')
}

Expand Down
2 changes: 1 addition & 1 deletion jenkins/vs/buildimage-vs-image-pr/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ mv target ../
post {

always {
junit(allowEmptyResults: true, keepLongStdio: true, testResults: 'sonic-mgmt/tests/results/tr*.xml')
junit(allowEmptyResults: true, keepLongStdio: true, testResults: 'sonic-mgmt/tests/results/**/*.xml')
archiveArtifacts(artifacts: 'target/**, sonic-mgmt/tests/results/**, sonic-mgmt/tests/logs/**')
}
}
Expand Down
2 changes: 1 addition & 1 deletion jenkins/vs/buildimage-vs-image-test/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pipeline {

always {
archiveArtifacts(artifacts: 'sonic-mgmt/tests/logs/**, sonic-mgmt/tests/results/**')
junit(allowEmptyResults: true, keepLongStdio: true, testResults: 'sonic-mgmt/tests/results/tr*.xml')
junit(allowEmptyResults: true, keepLongStdio: true, testResults: 'sonic-mgmt/tests/results/**/*.xml')
}

fixed {
Expand Down
2 changes: 1 addition & 1 deletion jenkins/vs/buildimage-vs-image/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ mv target ../
post {

always {
junit(allowEmptyResults: true, keepLongStdio: true, testResults: 'sonic-mgmt/tests/results/tr*.xml')
junit(allowEmptyResults: true, keepLongStdio: true, testResults: 'sonic-mgmt/tests/results/**/*.xml')
archiveArtifacts(artifacts: 'target/**, sonic-mgmt/tests/results/**, sonic-mgmt/tests/logs/**')
}

Expand Down
3 changes: 2 additions & 1 deletion scripts/vs/buildimage-vs-image/runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ run_pytest()
tdir=$(dirname $tn)
if [ $tdir != "." ]; then
mkdir -p logs/$tgname/$tdir
mkdir -p results/$tgname/$tdir
fi
py.test $PYTEST_COMMON_OPTS --log-file logs/$tgname/$tn.log --junitxml=results/tr_$tn-$tgname.xml $tn.py
py.test $PYTEST_COMMON_OPTS --log-file logs/$tgname/$tn.log --junitxml=results/$tgname/$tn.xml $tn.py
done
}

Expand Down

0 comments on commit 8525691

Please sign in to comment.