Skip to content

Commit

Permalink
[vs image] Add support for multiple test reports (sonic-net#79)
Browse files Browse the repository at this point in the history
[vs image] Add support for multiple test reports

With multiple test suites running in succession, the tr.xml get overwritten
with last test suite that run. With this change, every test suite will
produce its test report. Also, changing JUnit post API to pick up all
test reports generated.

signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
  • Loading branch information
tahmed-dev authored Feb 18, 2020
1 parent dc42242 commit 8fd37b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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 @@ -62,7 +62,7 @@ pipeline {
post {

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

fixed {
Expand Down
4 changes: 2 additions & 2 deletions scripts/vs/buildimage-vs-image/runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ tests_1vlan="\
# Run tests_1vlan on vlab-01 virtual switch
ANSIBLE_LIBRARY=/data/sonic-mgmt/ansible/library/ \
py.test --inventory veos.vtb --host-pattern all --user admin -vvv --show-capture stdout --testbed vms-kvm-t0 \
--testbed_file vtestbed.csv --disable_loganalyzer --junitxml=tr.xml $tests_1vlan
--testbed_file vtestbed.csv --disable_loganalyzer --junitxml=tr_1vlan.xml $tests_1vlan

# Create and deploy two vlan configuration (two_vlan_a) to the virtual switch
cd /data/sonic-mgmt/ansible
Expand All @@ -52,4 +52,4 @@ cd /data/sonic-mgmt/tests
# Run tests_2vlans on vlab-01 virtual switch
ANSIBLE_LIBRARY=/data/sonic-mgmt/ansible/library/ \
py.test --inventory veos.vtb --host-pattern all --user admin -vvv --show-capture stdout --testbed vms-kvm-t0 \
--testbed_file vtestbed.csv --disable_loganalyzer --junitxml=tr.xml $tests_2vlans
--testbed_file vtestbed.csv --disable_loganalyzer --junitxml=tr_2vlans.xml $tests_2vlans

0 comments on commit 8fd37b0

Please sign in to comment.