scripts/yocto_testresults_query.py: fix regression reports for branches with slashes

Regression reports are not generated on some integration branches because
yocto_testresults_query.py truncates branches names with slashes when it passes
it to resulttool. For example, "abelloni/master-next" is truncated to "abelloni"

Fix this unwanted branch truncation by fix tag parsing in yocto-testresults

(From OE-Core rev: b2fb7d7b0c05bb198a2271bbf1742645ba220ea3)

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexis Lothoré 2023-03-24 14:41:09 +01:00 committed by Richard Purdie
parent dd6157fc82
commit aee5758336

View File

@ -41,7 +41,7 @@ def get_sha1(pokydir, revision):
def get_branch(tag): def get_branch(tag):
# The tags in test results repository, as returned by git rev-list, have the following form: # The tags in test results repository, as returned by git rev-list, have the following form:
# refs/tags/<branch>/<count>-g<sha1>/<num> # refs/tags/<branch>/<count>-g<sha1>/<num>
return tag.split("/")[2] return '/'.join(tag.split("/")[2:-2])
def fetch_testresults(workdir, sha1): def fetch_testresults(workdir, sha1):
logger.info(f"Fetching test results for {sha1} in {workdir}") logger.info(f"Fetching test results for {sha1} in {workdir}")