]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
resulttool: Allow store to filter to specific revisions
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 13 Nov 2024 21:36:57 +0000 (21:36 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 14 Nov 2024 11:45:17 +0000 (11:45 +0000)
We have a challenge on the autobuilder where test results from both OE-Core
and poky are being mixed together during result storage which is confusing the
data. Add a way to filter to specific revisions as the least worst way to fix
the various issues this is causing.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/resulttool/store.py

index e0951f0a8f7079a212d877864e17068f341004ad..430213bbfe9377a830587bef39b7dfae1805f1ef 100644 (file)
@@ -65,6 +65,9 @@ def store(args, logger):
 
         for r in revisions:
             results = revisions[r]
+            if args.revision and r[0] != args.revision:
+                logger.info('skipping %s as non-matching' % r[0])
+                continue
             keywords = {'commit': r[0], 'branch': r[1], "commit_count": r[2]}
             subprocess.check_call(["find", tempdir, "!", "-path", "./.git/*", "-delete"])
             resultutils.save_resultsdata(results, tempdir, ptestlogs=True)
@@ -102,3 +105,5 @@ def register_commands(subparsers):
                               help='add executed-by configuration to each result file')
     parser_build.add_argument('-t', '--extra-test-env', default='',
                               help='add extra test environment data to each result file configuration')
+    parser_build.add_argument('-r', '--revision', default='',
+                              help='only store data for the specified revision')