]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
resulttool/regression: Ensure LTP results are only compared against other LTP runs
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 25 Feb 2023 14:02:17 +0000 (14:02 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 26 Feb 2023 11:55:31 +0000 (11:55 +0000)
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 <richard.purdie@linuxfoundation.org>
scripts/lib/resulttool/regression.py

index 1b0c8335a39e2b4824856e1df2bceae33e7e75b4..04a2f3fbb079e1eb516b4b3b610457665233d868 100644 (file)
@@ -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)