diff options
Diffstat (limited to '.ci/generate_test_report_github.py')
-rw-r--r-- | .ci/generate_test_report_github.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/.ci/generate_test_report_github.py b/.ci/generate_test_report_github.py index 7242264..6785e82 100644 --- a/.ci/generate_test_report_github.py +++ b/.ci/generate_test_report_github.py @@ -8,10 +8,15 @@ import platform import generate_test_report_lib -PLATFORM_TITLES = { - "Windows": ":window: Windows x64 Test Results", - "Linux": ":penguin: Linux x64 Test Results", -} +def compute_platform_title() -> str: + logo = ":window:" if platform.system() == "Windows" else ":penguin:" + # On Linux the machine value is x86_64 on Windows it is AMD64. + if platform.machine() == "x86_64" or platform.machine() == "AMD64": + arch = "x64" + else: + arch = platform.machine() + return f"{logo} {platform.system()} {arch} Test Results" + if __name__ == "__main__": parser = argparse.ArgumentParser() @@ -22,7 +27,7 @@ if __name__ == "__main__": args = parser.parse_args() report = generate_test_report_lib.generate_report_from_files( - PLATFORM_TITLES[platform.system()], args.return_code, args.build_test_logs + compute_platform_title(), args.return_code, args.build_test_logs ) print(report) |