<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11708</bug_id>
          
          <creation_ts>2017-06-23 07:00:56 +0000</creation_ts>
          <short_desc>CI: capture and display results of oe-selftest as JUnit XML</short_desc>
          <delta_ts>2017-07-13 06:25:58 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>IoT Reference OS Kit</product>
          <component>intel-iot-refkit-tools</component>
          <version>2.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.4 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Ohly">patrick.ohly</reporter>
          <assigned_to name="Olev Kartau">olev.kartau</assigned_to>
          <cc>mikko.ylinen</cc>
          
          <qa_contact name="yeoh ee peng">ee.peng.yeoh</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>74507</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-06-23 07:00:56 +0000</bug_when>
    <thetext>When python3 unittest-xml-reporting is installed (i.e. &quot;import xmlrunner&quot; works), then oe-selftest produces a directory called &quot;TestResults_&lt;date&gt;_&lt;number&gt;&quot; with individual .xml files.

We should enable that in our CI system by installing unittest-xml-reporting for Python3 and publish the resulting .xml files so that Jenkins shows the same way as DAFT test results.

unittest-xml-reporting wasn&apos;t packaged for Debian, but installation with &quot;sudo pip3 install unittest-xml-reporting&quot; worked fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74541</commentid>
    <comment_count>1</comment_count>
    <who name="Olev Kartau">olev.kartau</who>
    <bug_when>2017-06-26 11:57:08 +0000</bug_when>
    <thetext>python3-unittest-xml-reporting is pre-packaged for opensuse,
adding it to Docker image is now a commit in PR#205</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74544</commentid>
    <comment_count>2</comment_count>
    <who name="Olev Kartau">olev.kartau</who>
    <bug_when>2017-06-26 14:21:33 +0000</bug_when>
    <thetext>test run of #205 where python3-unittest-xml-reporting was added,
is here:

https://ostroproject.org/jenkins/job/intel-iot-refkit_pull-requests/1668/consoleFull

but I don&apos;t see any directory called &quot;TestResults_&lt;date&gt;_&lt;number&gt;&quot;
on worker, did I miss something about enabling this?
Where exactly should this directory appear, on main level, under build/
or somewhere else?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74569</commentid>
    <comment_count>3</comment_count>
    <who name="Olev Kartau">olev.kartau</who>
    <bug_when>2017-06-27 10:42:56 +0000</bug_when>
    <thetext>explanation is, python3-unittest-xml-reporting is not enough:
ImportError: No module named &apos;six&apos;

with python3-six added as well,
import xmlrunner works.
I will create a new PR (as 205 got dedicated) and try.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74576</commentid>
    <comment_count>4</comment_count>
    <who name="Olev Kartau">olev.kartau</who>
    <bug_when>2017-06-27 16:00:41 +0000</bug_when>
    <thetext>1st part verified, PR build created TestResults_ directory with 5 xml-files.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74606</commentid>
    <comment_count>5</comment_count>
    <who name="Olev Kartau">olev.kartau</who>
    <bug_when>2017-06-28 20:14:58 +0000</bug_when>
    <thetext>Test results parsed and published by jenkins:

https://ostroproject.org/jenkins/job/intel-iot-refkit_pull-requests/1781/testReport/

(result of testing PR#210)

The TEST-*.xml files are also accessible under &quot;Build Artifacts&quot; 
section of that job.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74620</commentid>
    <comment_count>6</comment_count>
    <who name="Mikko Ylinen">mikko.ylinen</who>
    <bug_when>2017-06-29 04:57:59 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; Test results parsed and published by jenkins:
&gt; 
&gt; https://ostroproject.org/jenkins/job/intel-iot-refkit_pull-requests/1781/
&gt; testReport/
&gt; 
&gt; (result of testing PR#210)
&gt; 
&gt; The TEST-*.xml files are also accessible under &quot;Build Artifacts&quot; 
&gt; section of that job.

Looks nice! Is it possible to add the results in the email summary too?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74688</commentid>
    <comment_count>7</comment_count>
    <who name="Olev Kartau">olev.kartau</who>
    <bug_when>2017-06-30 18:10:30 +0000</bug_when>
    <thetext>PR#210 now has email report part.
I was thinking, what to write as name of image for these tests,
initially I used &quot;post-build&quot;, but that&apos;s not really image name,
please propose better if yo have ideas.
I guess Device=qemu is correctly expressed.

In current run of PR#210 that part of report shows like:

Image: post-build
  Device: qemu
  Total:16  Pass:15  Fail:0  Skip:1  Error:0  N/A:0
  Run rate:93%  Pass rate of total:93%  Pass rate of exec:100%

This part will be shown as first, as post-build testing is first to complete.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74702</commentid>
    <comment_count>8</comment_count>
    <who name="Mikko Ylinen">mikko.ylinen</who>
    <bug_when>2017-07-03 06:36:35 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; I was thinking, what to write as name of image for these tests,
&gt; initially I used &quot;post-build&quot;, but that&apos;s not really image name,
&gt; please propose better if yo have ideas.
&gt; I guess Device=qemu is correctly expressed.

We don&apos;t necessarily have to follow the same pattern. Some of the self-tests do use qemu but not all so Device=qemu is not 100% correct. 

How about simply

oe-selftest: [pre|post]-build 
Total:16  Pass:15  Fail:0  Skip:1  Error:0  N/A:0
Run rate:93%  Pass rate of total:93%  Pass rate of exec:100%</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74722</commentid>
    <comment_count>9</comment_count>
    <who name="Olev Kartau">olev.kartau</who>
    <bug_when>2017-07-03 20:24:36 +0000</bug_when>
    <thetext>I had overlooked pre-test totally, there are XML files produced also.

https://ostroproject.org/jenkins/job/intel-iot-refkit_pull-requests/1893/console

(near end of output) 
is example of how Summary will look like,
if PR#210 gets merged as it is now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74804</commentid>
    <comment_count>10</comment_count>
    <who name="Olev Kartau">olev.kartau</who>
    <bug_when>2017-07-06 12:04:45 +0000</bug_when>
    <thetext>PR#210 was merged and this is now functional</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74990</commentid>
    <comment_count>11</comment_count>
    <who name="Olev Kartau">olev.kartau</who>
    <bug_when>2017-07-13 06:13:09 +0000</bug_when>
    <thetext>whats the known method to get python3 xmlrunner on Ubuntu 16.04.2 ?

package-install based solution is preferred, but I dont find such packaged.
There is python-xmlrunner package but it only provides xmlrunner for python2.

Installing python3-junitxml and/or python3-unittest2 does not help.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74991</commentid>
    <comment_count>12</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-07-13 06:25:58 +0000</bug_when>
    <thetext>(In reply to comment #11)
&gt; whats the known method to get python3 xmlrunner on Ubuntu 16.04.2 ?

Install the python3-pip package, then run (as root) &quot;pip3 install unitest-xml-reporting&quot;.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>