Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Oct 2014 01:22:55 -0700
From:      Craig Rodrigues <rodrigc@freebsd.org>
To:        Steve Wills <swills@freebsd.org>
Cc:        "freebsd-testing@freebsd.org" <freebsd-testing@freebsd.org>, freebsd-pkg@freebsd.org
Subject:   Integrating pkg test results into Jenkins
Message-ID:  <CAG=rPVeydri19EgdTaAP1t%2BVFKRG4UN8jpkN8Trx9LG_sCmxug@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG=rPVeydri19EgdTaAP1t%2BVFKRG4UN8jpkN8Trx9LG_sCmxug>