]> code.ossystems Code Review - openembedded-core.git/commitdiff
resulttool: Prevent multiple results for the same test
authorJon Mason <jdmason@kudzu.us>
Sun, 2 Jun 2019 18:29:13 +0000 (14:29 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 21 Aug 2019 20:50:32 +0000 (21:50 +0100)
Currently, if a test occurs multiple times over different series, the
code will sum these.  This can lead to confusion over the desired
results.  Change the code to report the redundant tests and skip adding
an additional values.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/resulttool/report.py

index a48c59f6325002003f6a7e803d934dba55c58977..f706280aa72a601750b12e4640f22273e6abf10b 100644 (file)
@@ -203,8 +203,22 @@ class ResultsTextReport(object):
             testresults = resultutils.load_resultsdata(source_dir)
         for testsuite in testresults:
             for resultid in testresults[testsuite]:
+                skip = False
                 result = testresults[testsuite][resultid]
                 machine = result['configuration']['MACHINE']
+
+                # Check to see if there is already results for these kinds of tests for the machine
+                for key in result['result'].keys():
+                    testtype = str(key).split('.')[0]
+                    if ((machine in self.ptests and testtype == "ptestresult" and self.ptests[machine]) or
+                        (machine in self.ltptests and testtype == "ltpiresult" and self.ltptests[machine]) or
+                        (machine in self.ltpposixtests and testtype == "ltpposixresult" and self.ltpposixtests[machine])):
+                        print("Already have test results for %s on %s, skipping %s" %(str(key).split('.')[0], machine, resultid))
+                        skip = True
+                        break
+                if skip:
+                    break
+
                 test_count_report = self.get_aggregated_test_result(logger, result, machine)
                 test_count_report['machine'] = machine
                 test_count_report['testseries'] = result['configuration']['TESTSERIES']