summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-09-27 21:31:54 +0100
committerSteve Sakoman <steve@sakoman.com>2023-10-25 04:51:01 -1000
commitc4f83aa58cef67b1ff436422b9c4e69844d0e6b4 (patch)
treeb809ba5284327d8f14a3e2d0a1855debca59358d
parent1cb8768b28e9af8f44e57160e60665eb8670e32c (diff)
downloadpoky-c4f83aa58cef67b1ff436422b9c4e69844d0e6b4.tar.gz
oeqa/utils/gitarchive: Handle broken commit counts in results repo
The test results repository contains tags like: master/64501-g65c94ca3196e5ef3344a469fea8e30444f2e967a/0 master/1-g65c94ca3196e5ef3344a469fea8e30444f2e967a/3 master/1-g65c94ca3196e5ef3344a469fea8e30444f2e967a/2 master/1-g65c94ca3196e5ef3344a469fea8e30444f2e967a/1 master/1-g65c94ca3196e5ef3344a469fea8e30444f2e967a/0 where the commit count is correct in one case and not in the others. This causes assertion errors in the current code. Add in some code to work around these historical issues where the commit counts are low. (From OE-Core rev: 27c1ad02b9479f30ad8eacdee1cdad79cab5269d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit d51fc5c8c469730885af7bbde7122032de411d89) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/lib/oeqa/utils/gitarchive.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/gitarchive.py b/meta/lib/oeqa/utils/gitarchive.py
index 73beafecb5..6046f183d5 100644
--- a/meta/lib/oeqa/utils/gitarchive.py
+++ b/meta/lib/oeqa/utils/gitarchive.py
@@ -221,7 +221,15 @@ def get_test_revs(log, repo, tag_name, **kwargs):
221 if not commit in revs: 221 if not commit in revs:
222 revs[commit] = TestedRev(commit, commit_num, [tag]) 222 revs[commit] = TestedRev(commit, commit_num, [tag])
223 else: 223 else:
224 assert commit_num == revs[commit].commit_number, "Commit numbers do not match" 224 if commit_num != revs[commit].commit_number:
225 # Historically we have incorrect commit counts of '1' in the repo so fix these up
226 if int(revs[commit].commit_number) < 5:
227 tags = revs[commit].tags
228 revs[commit] = TestedRev(commit, commit_num, [tags])
229 elif int(commit_num) < 5:
230 pass
231 else:
232 sys.exit("Commit numbers for commit %s don't match (%s vs %s)" % (commit, commit_num, revs[commit].commit_number))
225 revs[commit].tags.append(tag) 233 revs[commit].tags.append(tag)
226 234
227 # Return in sorted table 235 # Return in sorted table