11 Commits

Author SHA1 Message Date
Clark Boylan
e3852213b0 Make subunit2html.py python2.6 compatible.
* modules/jenkins/files/slave_scripts/subunit2html.py: Swap out unittest
with testtools for python 2.6 compatibility. Remove argparse and
manually parse argv for python 2.6 compatibility.

Change-Id: If3a253439550b5394b9b7eac129d8ed66b7ba951
Reviewed-on: https://review.openstack.org/26785
Reviewed-by: lifeless <robertc@robertcollins.net>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2013-04-12 14:49:25 +00:00
Robert Collins
c8962dea27 Automatically handle subunit v1 or v2 streams.
Change-Id: Ib1ef05a6aa66606d03eca81d50ba84f6e6f41c1b
Reviewed-on: https://review.openstack.org/26688
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-04-11 21:10:51 +00:00
Clark Boylan
a0792fddc0 Make subunit2html compatible with subunit>=0.0.11.
* modules/jenkins/files/slave_scripts/subunit2html.py: Python subunit
ByteStreamToStreamResult takes an argument of non_subunit_name and not
non_subunit_input. Correct the argument name. Use argparse to parse the
command line arguments and add a new -2 options that specifies subunit
version 2 format logs should be read in. Otherwise read in version 1
subunit format.

This commit makes the second file name arg to subunit2html a required
argument and it is no longer optional. run-tox.sh already supplies both
file name arguments so this shouldn't break Jenkins.

Change-Id: I90804d4d12d77a544451c1647a137dc4b3b38f17
Reviewed-on: https://review.openstack.org/26430
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2013-04-09 16:37:14 +00:00
Robert Collins
cb38ca1361 Teach subunit2html to use v2 when it is available.
This changes the API of the result object to be more standard with
Python2.7+ APIs.

Change-Id: I1dd3da2280d687a591efd069ef43b1f2bc40e9f1
Reviewed-on: https://review.openstack.org/23670
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2013-03-07 05:17:55 +00:00
Sean Dague
5f4013b168 make html less jumpy
clean up the html in the subunit2html style so that when you
open up sections the whole thing doesn't jump around on you
(i.e. column widths change, hot links drop around.)

Do this by shrinking the desc (don't repeat class name)

For table to 100% width, but shrink first column to 40%

Shrink all the number columns to 40px, and add an 8th colum to take
up the slack that happens when the results are shown.

Make the results div overflow-x: scroll, to ensure the page doesn't
get wider than the browser.

Change-Id: I9346d703778287fa7f1c72e2de077f225af070fb
Reviewed-on: https://review.openstack.org/20223
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-01-22 21:16:35 +00:00
Sean Dague
6a5ed3de67 stop duplicating class name.
this code really liked to duplicate the class name. I think
we can handle having it only once in the string.

Change-Id: Ie720d5b03f1656cacb8662c99412b24cb0641165
Reviewed-on: https://review.openstack.org/20210
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-01-22 21:16:12 +00:00
Sean Dague
43a7951b34 sort results, like this function says it does
this function is called _sortResult, however it does nothing
of the kind. sorting the results is useful for finding things,
so lets do that.

Change-Id: I6a1843a2014fa4dc21df6b8f6f7bf09091c1a9ba
Reviewed-on: https://review.openstack.org/20209
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-01-22 21:15:58 +00:00
Sean Dague
e6a27b8537 stop duplicating class name in subunit results
for some crazy reason, we always duplicate the class name in the
string. Stop that, it's crazy.

Change-Id: I903d89bc2b3364603d420e7ebdc9812e8abc1ce2
Reviewed-on: https://review.openstack.org/20208
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-01-22 21:15:49 +00:00
Sean Dague
1d83bef301 fix subunit2html pep8 issues
trying to fix other parts of the script, but because my emacs is
configured for pep8 inline highlighting I can't start on that until
it stops being lit up like a christmas tree.

Shouldn't have changed any behavior.

Change-Id: I9a65f893f34226525e64a902c50fee9e3d611fc7
Reviewed-on: https://review.openstack.org/20207
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-01-22 21:15:02 +00:00
Clark Boylan
3b53ea42e7 Give subunit2html proper shebang.
subunit2html was missing a shebang and was being evaluated by bash
instead of python. Give it a shebang to make it work properly.

Change-Id: I8c766c32263642f3c2cc4155b979f2ad3dc1e8ed
Reviewed-on: https://review.openstack.org/17992
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2012-12-13 01:40:24 +00:00
Clark Boylan
abc5b00d63 Capture testr log files when testr is used.
When testr is the test runner that is used capture the subunit stream
log file, convert it to pretty html output and publish both the log and
html file to static.openstack.org.

Change-Id: I0b79e048d25f2a8bc7cca6adf583d788809c7f05
Reviewed-on: https://review.openstack.org/17964
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2012-12-12 21:51:01 +00:00