Integrating pkg test results into Jenkins

Craig Rodrigues rodrigc at freebsd.org
Thu Oct 2 08:22:58 UTC 2014


Hi,

I notice that at http://jenkins.mouf.net/job/pkg/ you are using kyua to
test pkg.

Instead of producing an HTML page of the test results, you may wish
to integrate the output of the tests directly into Jenkins.

You can do this by:

(1)  In your Jenkins job's Build section, add this to the end:

set +e
# You don't want the job to abort here if kyua returns
# non-zero status due to any test failurs
kyua test
kyua_status=$?
set -e

kyua report-junit --output=$WORKSPACE/test-report.xml
exit $kyua_status

(2)  In your Jenkins job's Post-Build Actions, add:

     "Publish JUnit test result report"

     "Test Report XMLs"  -> test-report.xml


The end result is quite nice, and looks like this:

https://jenkins.freebsd.org/jenkins/job/FreeBSD_HEAD-tests2/8/testReport/

--
Craig


More information about the freebsd-testing mailing list