aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Mason <jdmason@kudzu.us>2019-06-02 14:29:13 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-21 21:52:59 +0100
commit87138c4c2bc5618d10349944dedfe9cdacd34ab7 (patch)
tree85e3a06f35c69bdd0b537c47e1d6a356cd1ee51a
parent12722ccf05596145bfc6e4642452a6c639d95318 (diff)
downloadopenembedded-core-contrib-87138c4c2bc5618d10349944dedfe9cdacd34ab7.tar.gz
openembedded-core-contrib-87138c4c2bc5618d10349944dedfe9cdacd34ab7.tar.bz2
openembedded-core-contrib-87138c4c2bc5618d10349944dedfe9cdacd34ab7.zip
resulttool: Prevent multiple results for the same test
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. (From OE-Core rev: caeaa0648dff64c56a33f52e45e82bfab6719e3e) Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/lib/resulttool/report.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/lib/resulttool/report.py b/scripts/lib/resulttool/report.py
index a48c59f6325..f706280aa72 100644
--- a/scripts/lib/resulttool/report.py
+++ b/scripts/lib/resulttool/report.py
@@ -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']