Merge lp:~canonical-platform-qa/qa-jenkins-jobs/ubiquity-subunit-to-junitxml into lp:qa-jenkins-jobs

Proposed by Christopher Lee
Status: Merged
Approved by: Christopher Lee
Approved revision: 46
Merged at revision: 44
Proposed branch: lp:~canonical-platform-qa/qa-jenkins-jobs/ubiquity-subunit-to-junitxml
Merge into: lp:qa-jenkins-jobs
Diff against target: 39 lines (+22/-0)
1 file modified
ubiquity/jobs.yaml (+22/-0)
To merge this branch: bzr merge lp:~canonical-platform-qa/qa-jenkins-jobs/ubiquity-subunit-to-junitxml
Reviewer Review Type Date Requested Status
Max Brustkern (community) Approve
Review via email: mp+290946@code.launchpad.net

Commit message

For the ubiquity autopilot jobs generate junitxml files from any subunit file results.

Description of the change

For the ubiquity autopilot jobs generate junitxml files from any subunit file results.

To post a comment you must log in.
Revision history for this message
Max Brustkern (nuclearbob) wrote :

I'd like to merge with this patch. I'll confirm with Chris later today and then land this.
=== modified file 'ubiquity/jobs.yaml'
--- ubiquity/jobs.yaml 2016-04-05 03:42:59 +0000
+++ ubiquity/jobs.yaml 2016-04-05 18:24:54 +0000
@@ -63,6 +63,7 @@

 - builder:
     name: generate-junit-files
+ #TODO: add installation of subunit package to setup job somewhere
     builders:
       - shell: |
             #!/bin/bash
@@ -72,7 +73,7 @@
                     echo "Processing: ${{sfile}}"
                     filename=$(basename ${{sfile}})
                     base_filename=${{filename%.*}}
- new_xml_file="${{source_dir}}/${{base_filename}}.xml"
+ new_xml_file="{source_dir}/${{base_filename}}.xml"
                     echo "Generating: ${{new_xml_file}}"
                     subunit2junitxml "${{sfile}}" > "${{new_xml_file}}"
                 done

Revision history for this message
Christopher Lee (veebers) wrote :

Good catch Max, yeah your patch is needed.

46. By Christopher Lee

Use the right source_dir variable.

Revision history for this message
Max Brustkern (nuclearbob) wrote :

Works for me!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubiquity/jobs.yaml'
2--- ubiquity/jobs.yaml 2016-03-09 18:52:57 +0000
3+++ ubiquity/jobs.yaml 2016-04-05 21:52:21 +0000
4@@ -61,6 +61,26 @@
5 FULLNAME="ubiquity_autopilot_tests.tests.{test}"
6 $BZRDIR/autopilot/ubiquity-autopilot-runner/run-ubiquity-test -t $FULLNAME $ISO
7
8+- builder:
9+ name: generate-junit-files
10+ builders:
11+ - shell: |
12+ #!/bin/bash
13+ if [ -d {source_dir} ]; then
14+ for sfile in {source_dir}/*.subunit
15+ do
16+ echo "Processing: ${{sfile}}"
17+ filename=$(basename ${{sfile}})
18+ base_filename=${{filename%.*}}
19+ new_xml_file="{source_dir}/${{base_filename}}.xml"
20+ echo "Generating: ${{new_xml_file}}"
21+ subunit2junitxml "${{sfile}}" > "${{new_xml_file}}"
22+ done
23+ else
24+ echo "ERROR: source directory does not exist"
25+ fi
26+
27+
28 - job-template:
29 name: 'ubiquity_ap-{flavor}_{release}_{arch}-{test}'
30 description: |
31@@ -81,6 +101,8 @@
32 variant: 'desktop'
33 arch: '{arch}'
34 test: '{test}'
35+ - generate-junit-files:
36+ source_dir: 'results/var/local/autopilot/junit'
37 publishers:
38 - archive-artifacts
39 - junit:

Subscribers

People subscribed via source and target branches