Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
squad-compare-compat: add a 3way compare
Browse files Browse the repository at this point in the history
This patch aiming to create a list between
native 64-bit, 64-bit compat and native 32-bit tests.

Signed-off-by: Anders Roxell <[email protected]>
  • Loading branch information
roxell committed May 14, 2024
1 parent 5031ee8 commit 6e00417
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions squad-compare-compat
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def run():
)

table_filename = "table-compat.txt"
headings = "non-compat | compat | build_version/device/build_name/testsuite/test\n"
headings = f"{headings}--------------------------------------------------------------------\n"
headings = "64-bit native | compat | 32-bit native | build_version/device/build_name/testsuite/test\n"
headings = f"{headings}----------------------------------------------------------------------------\n"
with open(table_filename, "w") as fp:
fp.write(headings)
for group_name, project_name, build_name in args.gpb:
Expand All @@ -140,17 +140,35 @@ def run():
file_lines = file_open.readlines()

compatlist = {}
native32list = {}
for line in file_lines:
test_name, test_result = line.split()
build_name = test_name.split("/")[1]
device_name, build_name = test_name.split("/")[0:2]
test_name = "/".join(test_name.split("/")[1:])

if build_name.endswith("-compat"):
compatlist[test_name.replace("-compat", "")] = test_result
elif device_name in ["qemu-armv7", "x15", "qemu-i386", "i386"]:
native32list[test_name] = test_result

for line in file_lines:
test_name, test_result = line.split()
if test_name in compatlist.keys():
if test_result != compatlist[test_name]:
device_name, build_name = test_name.split("/")[0:2]
test_name = "/".join(test_name.split("/")[1:])
if test_name in compatlist.keys() and device_name not in [
"qemu-armv7",
"x15",
"qemu-i386",
"i386",
]:
if test_name not in native32list.keys():
native32list[test_name] = None
if (
test_result != compatlist[test_name]
or test_result != native32list[test_name]
):
fp.write(
f"{test_result} | {compatlist[test_name]} : {build.version}/{test_name}\n"
f"{test_result} | {compatlist[test_name]} | {native32list[test_name]} : {build.version}/{device_name}/{test_name}\n"
)

logger.debug(f"group: {group}, project: {project}, build: {build}")
Expand Down

0 comments on commit 6e00417

Please sign in to comment.