Merge "Add xunit support to make-unit-test for openolt"
diff --git a/jjb/defaults.yaml b/jjb/defaults.yaml
index 9699b23..d2a34bd 100644
--- a/jjb/defaults.yaml
+++ b/jjb/defaults.yaml
@@ -145,9 +145,15 @@
siab-projects-regexp: '^(xos-core/.*|xos-profiles/seba-services/.*|xos-profiles/base-kubernetes/.*|xos-profiles/ponsim-pod/.*|workflows/att-workflow/.*|voltha/.*|onos/.*|mininet/.*|configs/seba-ponsim.yaml)$'
# Optionally allow JUnit results to be empty when test framework is set up,
- # but no tests exist. Default behavior is to fail when test results are empty.
+ # but no tests exist. Default behavior is to fail when test results are
+ # empty. Also will not vote if no test output exists - good for repos where
+ # tests or test output generation may not yet exist.
junit-allow-empty-results: false
+ # Allow xunit to not vote if no test files exist. Default is true because
+ # jUnit is the more commonly supported output format.
+ xunit-skip-if-no-test-files: true
+
# Unit test targets
# List of targets to run when testing a patchset, run with make or similar
# defaults to just 'test', multiple targets should be space separated
diff --git a/jjb/make-unit.yaml b/jjb/make-unit.yaml
index 9101df3..0effd2e 100644
--- a/jjb/make-unit.yaml
+++ b/jjb/make-unit.yaml
@@ -54,6 +54,12 @@
- junit:
results: "**/*results.xml,**/*report.xml"
allow-empty-results: '{junit-allow-empty-results}'
+ - xunit:
+ types:
+ - gunit:
+ pattern: "**/*xunit.xml"
+ deleteoutput: false
+ skip-if-no-test-files: '{xunit-skip-if-no-test-files}'
- cobertura:
report-file: "**/*coverage.xml"
targets:
diff --git a/jjb/verify/openolt.yaml b/jjb/verify/openolt.yaml
index 7b4eac8..91159f6 100644
--- a/jjb/verify/openolt.yaml
+++ b/jjb/verify/openolt.yaml
@@ -15,7 +15,11 @@
- 'verify-licensed'
- 'tag-collision-reject'
- 'make-unit-test':
+ build-node: 'ubuntu16.04-basebuild-2c-4g'
unit-test-targets: 'test'
+ # openolt uses gtest which outputs in xunit format
+ junit-allow-empty-results: true
+ xunit-skip-if-no-test-files: false
# This and the job-template below were written in October 2018
#