From 073a93ce313b215a14205c1426061f0643995314 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Tue, 21 Aug 2012 11:57:19 -0700 Subject: [PATCH] Enable Nose HTML output on unittest jobs. Have nose output an HTML results file at the end of unittest builds. Also copy that results file to static.openstack.org. Change-Id: I46c487919e09d25eebf2858830bde080a4c8e4f4 Reviewed-on: https://review.openstack.org/11736 Approved: James E. Blair Reviewed-by: James E. Blair Tested-by: Jenkins --- .../jenkins/files/slave_scripts/run-tox.sh | 1 + .../config/python-jobs.yaml | 24 ++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/modules/jenkins/files/slave_scripts/run-tox.sh b/modules/jenkins/files/slave_scripts/run-tox.sh index 3f4a9f8ce3..2197580842 100755 --- a/modules/jenkins/files/slave_scripts/run-tox.sh +++ b/modules/jenkins/files/slave_scripts/run-tox.sh @@ -23,6 +23,7 @@ fi venv=py$version export NOSE_WITH_XUNIT=1 +export NOSE_WITH_HTML_OUTPUT=1 tox -e$venv result=$? diff --git a/modules/openstack_project/files/jenkins_job_builder/config/python-jobs.yaml b/modules/openstack_project/files/jenkins_job_builder/config/python-jobs.yaml index 9017d11e34..0327858815 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/python-jobs.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/python-jobs.yaml @@ -112,7 +112,16 @@ - python26 publishers: - - console-log + - scp: + site: 'static.openstack.org' + files: + - target: 'logs/$ZUUL_CHANGE/$ZUUL_PATCHSET/$ZUUL_PIPELINE/$JOB_NAME/$BUILD_NUMBER' + source: 'results.html' + keep-hierarchy: true + copy-after-failure: true + - target: 'logs/$ZUUL_CHANGE/$ZUUL_PATCHSET/$ZUUL_PIPELINE/$JOB_NAME/$BUILD_NUMBER' + copy-console: true + copy-after-failure: true # >= precise does not have python2.6 node: oneiric @@ -135,7 +144,7 @@ artifactNumToKeep: -1 parameters: - - label: + - label: name: NODE_LABEL description: Label of node to use for this build default: '{node}' @@ -148,7 +157,16 @@ - python27 publishers: - - console-log + - scp: + site: 'static.openstack.org' + files: + - target: 'logs/$ZUUL_CHANGE/$ZUUL_PATCHSET/$ZUUL_PIPELINE/$JOB_NAME/$BUILD_NUMBER' + source: 'results.html' + keep-hierarchy: true + copy-after-failure: true + - target: 'logs/$ZUUL_CHANGE/$ZUUL_PATCHSET/$ZUUL_PIPELINE/$JOB_NAME/$BUILD_NUMBER' + copy-console: true + copy-after-failure: true node: '{node}'