
This patch moves the platform specific test report titles to the generate_test_report_github.py script. This means that the functions in the monolithic-* scripts are exactly the same now and can be moved into a separate script that can be shared between the two scripts. Reviewers: DavidSpickett, cmtice, lnihlen, dschuff, Keenuts, gburgessiv Reviewed By: DavidSpickett Pull Request: https://github.com/llvm/llvm-project/pull/152198
27 lines
878 B
Python
27 lines
878 B
Python
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
# See https://llvm.org/LICENSE.txt for license information.
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
"""Script to generate a build report for Github."""
|
|
|
|
import argparse
|
|
import platform
|
|
|
|
import generate_test_report_lib
|
|
|
|
PLATFORM_TITLES = {
|
|
"Windows": ":window: Windows x64 Test Results",
|
|
"Linux": ":penguin: Linux x64 Test Results",
|
|
}
|
|
|
|
if __name__ == "__main__":
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("return_code", help="The build's return code.", type=int)
|
|
parser.add_argument("junit_files", help="Paths to JUnit report files.", nargs="*")
|
|
args = parser.parse_args()
|
|
|
|
report = generate_test_report_lib.generate_report_from_files(
|
|
PLATFORM_TITLES[platform.system()], args.return_code, args.junit_files
|
|
)
|
|
|
|
print(report)
|