Hal Test Execution Report Modification 17/186217/1
authorbipinkumar <bipin.k@samsung.com>
Wed, 8 Aug 2018 06:29:43 +0000 (11:59 +0530)
committerbipinkumar <bipin.k@samsung.com>
Wed, 8 Aug 2018 06:29:43 +0000 (11:59 +0530)
Change-Id: I50a2fe874d04d9de600e9c27e27ba809258adc15
Signed-off-by: bipinkumar <bipin.k@samsung.com>
Res/HAL_rpm.txt
Scripts/summary_report.xsl
Scripts/test_xml_generate.py

index 81e0ffe..f7ac27d 100644 (file)
@@ -1,7 +1,7 @@
-camera-haltests-0.0.10-7.1.armv7l.rpm
+camera-haltests-0.0.11-8.1.armv7l.rpm
 device-haltests-0.1.1-6.2.armv7l.rpm
-libtapi-haltests-0.8.28-7.3.armv7l.rpm
+libtapi-haltests-0.8.29-8.4.armv7l.rpm
 libtbm-haltests-3.0.1-42.2.armv7l.rpm
 libtdm-haltests-2.0.1-56.2.armv7l.rpm
-net-config-haltests-1.1.136-64.1.armv7l.rpm
+net-config-haltests-1.1.136-64.2.armv7l.rpm
 pass-haltests-1.0.0-24.1.armv7l.rpm
index 219366d..dcd3469 100755 (executable)
@@ -19,6 +19,7 @@ H3                                    { color:#333333; font-family:'Times New Roman' '
 H4                                     { color:#444444; font-family:'Times New Roman' '\82l\82\82o\96¾\92©' 'serif'; border-style:solid; border-width:0px; border-bottom-width:1px; border-bottom-color:#CCCCDD; margin-bottom:8px; }
 H5                                     { color:#555555; font-family:'Times New Roman' '\82l\82\82o\96¾\92©' 'serif'; border-style:solid; border-width:0px; border-bottom-width:1px; border-bottom-color:#EEEEFF; margin-bottom:8px; }
 H6                                     { color:#666666; font-family:'Times New Roman' '\82l\82\82o\96¾\92©' 'serif'; border-style:solid; border-width:0px; border-bottom-width:1px; border-bottom-color:#F8F8FF; margin-bottom:8px; }
+H8                                     { color:#000000; font-family:'Times New Roman' '\82l\82\82o\96¾\92©' 'serif'; border-style:red; border-width:0px; border-bottom-width:3px; border-bottom-color:#000000;font-weight:bold;font-size: 16px;}
 
 SPAN.good                      { color:#006666; font-weight:bold; }
 SPAN.critical          { color:#880000; font-weight:bold; }
@@ -37,17 +38,19 @@ SPAN.critical               { color:#880000; font-weight:bold; }
     <TABLE width="1550">
                <TR>
                        <TH>Name</TH>
-                       <TH>Tests</TH>
-                       <TH>Failures</TH>
+                       <TH>Total</TH>
+                       <TH>Pass</TH>
+                       <TH>Fail</TH>
                        <TH>Disabled</TH>
                        <TH>Errors</TH>
-                       <TH>Time</TH>
+                       <TH>Time(s)</TH>
                        <TH>LogFile</TH>
                </TR>
                <xsl:apply-templates select="testsuite"/>
                <TR>
                <TD> <H7><xsl:value-of select="@name"/></H7></TD>
                <TD><H7><xsl:value-of select="@tests"/></H7></TD>
+               <TD><H7><xsl:value-of select="@pass"/></H7></TD>
                <TD><H7><xsl:value-of select="@failures"/></H7></TD>
                <TD><H7><xsl:value-of select="@disabled"/></H7></TD>
                <TD><H7><xsl:value-of select="@errors"/></H7></TD>
@@ -57,17 +60,56 @@ SPAN.critical               { color:#880000; font-weight:bold; }
        </TABLE>
 
        <br/><br/><br/>
+       <H2>Note</H2>
+       
+       <TABLE width="655">
+               <TR>
+                       <TD><H8>Disabled</H8></TD>
+                       <TD>Number of testcases not being run,temporarily skipped.</TD>
+               </TR>
+               <TR>
+                       <TD><H8>Errors</H8></TD>
+                       <TD>Testcases which had errors because of  unhandled exceptions in the code.</TD>
+               </TR>
+               <TR>
+                       <TD><H8>Fail</H8></TD>
+                       <TD>Testcases which had failed because of assertion failure.</TD>
+               </TR>
+               <TR>
+                       <TD><H8>Time(s)</H8></TD>
+                       <TD>Time (seconds) taken by the module for complete test execution.</TD>
+               </TR>
+               <TR>
+                       <TD><H8>LogFile</H8></TD>
+                       <TD>The gtest log  attached for respective modules.</TD>
+               </TR>
+       </TABLE>
 </xsl:template>
 
 <xsl:template match="testsuite">
        <TR>
-               <TD><a href="{@name}.xml"><xsl:value-of select="@name" /></a></TD>
-               <TD><xsl:value-of select="@tests"/></TD>
-               <TD><xsl:value-of select="@failures"/></TD>
-               <TD><xsl:value-of select="@disabled"/></TD>
-               <TD><xsl:value-of select="@errors"/></TD>
-               <TD><xsl:value-of select="@time"/></TD>
-               <TD><a href="{@name}.txt"><xsl:value-of select="@Log" /></a></TD>
+               <xsl:choose>
+                       <xsl:when test="@failures &gt;'0'">
+                               <TD><a href="{@name}.xml"><xsl:value-of select="@name" /></a></TD>
+                               <TD><xsl:value-of select="@tests"/></TD>
+                               <TD><xsl:value-of select="@pass"/></TD>
+                               <TD><H7><xsl:value-of select="@failures"/></H7></TD>
+                               <TD><xsl:value-of select="@disabled"/></TD>
+                               <TD><xsl:value-of select="@errors"/></TD>
+                               <TD><xsl:value-of select="@time"/></TD>
+                               <TD><a href="{@name}.txt"><xsl:value-of select="@Log" /></a></TD>
+                       </xsl:when>
+                        <xsl:otherwise>
+                               <TD><a href="{@name}.xml"><xsl:value-of select="@name" /></a></TD>
+                               <TD><xsl:value-of select="@tests"/></TD>
+                               <TD><xsl:value-of select="@pass"/></TD>
+                               <TD><xsl:value-of select="@failures"/></TD>
+                               <TD><xsl:value-of select="@disabled"/></TD>
+                               <TD><xsl:value-of select="@errors"/></TD>
+                               <TD><xsl:value-of select="@time"/></TD>
+                               <TD><a href="{@name}.txt"><xsl:value-of select="@Log" /></a></TD>
+                       </xsl:otherwise>
+               </xsl:choose>
        </TR>
 </xsl:template>
 
index 150c24d..1a90245 100644 (file)
@@ -26,6 +26,7 @@ g_disabled_v=0
 g_errors_v=0
 g_failures_v=0
 g_time_v=0
+g_pass_v=0
 
 xml_list="./xml_list.txt"
 err_list="./err_list.txt"
@@ -56,12 +57,13 @@ def process_xml(input_file):
     xmldoc = minidom.parse(input_file)
     itemlist = xmldoc.getElementsByTagName('testsuites')
     for s in itemlist:
-        global g_tests_v,g_disabled_v,g_errors_v,g_failures_v,g_time_v,doc,root
+        global g_tests_v,g_disabled_v,g_errors_v,g_failures_v,g_time_v,g_pass_v,doc,root
         g_tests_v=g_tests_v + int (s.attributes['tests'].value)
         g_disabled_v=g_disabled_v +int(s.attributes['disabled'].value)
         g_errors_v = g_errors_v + int(s.attributes['errors'].value)
         g_time_v = g_time_v + float(s.attributes['time'].value)
         g_failures_v = g_failures_v + int(s.attributes['failures'].value)
+        g_pass_v = g_pass_v + (int (s.attributes['tests'].value) - int(s.attributes['failures'].value))
 
     if input_file.endswith('.xml'):
             input_file = input_file[:-4]
@@ -71,6 +73,8 @@ def process_xml(input_file):
     l_disabled_v=itemlist[0].attributes['disabled'].value
     l_errors_v=itemlist[0].attributes['errors'].value
     l_time_v=itemlist[0].attributes['time'].value
+    pass_v = int (l_tests_v) - int (l_failures_v)
+    l_pass_v= str(pass_v)
 
     doc.appendChild(root)
     leaf = doc.createElement('testsuite')
@@ -79,6 +83,7 @@ def process_xml(input_file):
     leaf.setAttribute('name',l_name_v)##This has been modified as per module
     leaf.setAttribute('tests',l_tests_v)
     leaf.setAttribute('failures',l_failures_v)
+    leaf.setAttribute('pass',l_pass_v)
     leaf.setAttribute('disabled',l_disabled_v)
     leaf.setAttribute('errors',l_errors_v)
     leaf.setAttribute('time',l_time_v)
@@ -103,6 +108,7 @@ def process_error(input_file):
     leaf.setAttribute('name',l_name_v)##This has been modified as per module
     leaf.setAttribute('tests',"0")
     leaf.setAttribute('failures',"0")
+    leaf.setAttribute('pass',"0")
     leaf.setAttribute('disabled',"0")
     leaf.setAttribute('errors',"Not Run")
     leaf.setAttribute('time',"0")
@@ -131,9 +137,10 @@ if os.path.exists (err_list):
 ###Add Root nodes Having Summation of counters of respective suites########
 root.setAttribute('tests',str(g_tests_v))
 root.setAttribute('failures',str(g_failures_v))
+root.setAttribute('pass',str(g_pass_v))
 root.setAttribute('disabled',str(g_disabled_v))
 root.setAttribute('errors',str(g_errors_v))
-root.setAttribute('time',str(g_time_v))
+root.setAttribute('time',str(round(g_time_v,3)))
 root.setAttribute('name','AllTests')