diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-27 21:31:54 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-28 12:37:47 +0100 |
commit | fc5a15cc646b994edd26cd9d5040c8bad6634dc3 (patch) | |
tree | 84872314bf66f1e28c0edfe0de961a51bc5045cf /meta | |
parent | d9d8cd345f2a4b5ab7996f8a087413c0495d41c5 (diff) | |
download | poky-fc5a15cc646b994edd26cd9d5040c8bad6634dc3.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: d51fc5c8c469730885af7bbde7122032de411d89)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/utils/gitarchive.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/gitarchive.py b/meta/lib/oeqa/utils/gitarchive.py index 64448f47d9..f9c152681d 100644 --- a/meta/lib/oeqa/utils/gitarchive.py +++ b/meta/lib/oeqa/utils/gitarchive.py | |||
@@ -255,7 +255,15 @@ def get_test_revs(log, repo, tag_name, **kwargs): | |||
255 | if not commit in revs: | 255 | if not commit in revs: |
256 | revs[commit] = TestedRev(commit, commit_num, [tag]) | 256 | revs[commit] = TestedRev(commit, commit_num, [tag]) |
257 | else: | 257 | else: |
258 | assert commit_num == revs[commit].commit_number, "Commit numbers do not match" | 258 | if commit_num != revs[commit].commit_number: |
259 | # Historically we have incorrect commit counts of '1' in the repo so fix these up | ||
260 | if int(revs[commit].commit_number) < 5: | ||
261 | tags = revs[commit].tags | ||
262 | revs[commit] = TestedRev(commit, commit_num, [tags]) | ||
263 | elif int(commit_num) < 5: | ||
264 | pass | ||
265 | else: | ||
266 | sys.exit("Commit numbers for commit %s don't match (%s vs %s)" % (commit, commit_num, revs[commit].commit_number)) | ||
259 | revs[commit].tags.append(tag) | 267 | revs[commit].tags.append(tag) |
260 | 268 | ||
261 | # Return in sorted table | 269 | # Return in sorted table |