If a test result contains LTP test results, it should only be compared with
other runs containing LTP test results.

Signed-off-by: Richard Purdie <[email protected]>
---
 scripts/lib/resulttool/regression.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/resulttool/regression.py 
b/scripts/lib/resulttool/regression.py
index 1b0c8335a39..04a2f3fbb07 100644
--- a/scripts/lib/resulttool/regression.py
+++ b/scripts/lib/resulttool/regression.py
@@ -146,6 +146,7 @@ def can_be_compared(logger, base, target):
     run with different tests sets or parameters. Return true if tests can be
     compared
     """
+    ret = True
     base_configuration = base['configuration']
     target_configuration = target['configuration']
 
@@ -165,7 +166,11 @@ def can_be_compared(logger, base, target):
             logger.debug(f"Enriching {target_configuration['STARTTIME']} with 
{guess}")
             target_configuration['OESELFTEST_METADATA'] = guess
 
-    return metadata_matches(base_configuration, target_configuration) \
+    # Test runs with LTP results in should only be compared with other runs 
with LTP tests in them
+    if base_configuration.get('TEST_TYPE') == 'runtime' and 
any(result.startswith("ltpresult") for result in base['result']):
+        ret = target_configuration.get('TEST_TYPE') == 'runtime' and 
any(result.startswith("ltpresult") for result in target['result'])
+
+    return ret and metadata_matches(base_configuration, target_configuration) \
         and machine_matches(base_configuration, target_configuration)
 
 
-- 
2.37.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177730): 
https://lists.openembedded.org/g/openembedded-core/message/177730
Mute This Topic: https://lists.openembedded.org/mt/97243394/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to