コード例 #1
0
ファイル: SATest.py プロジェクト: wtismyza/_LLVM
def build(parser, args):
    SATestBuild.VERBOSE = args.verbose

    project_map = ProjectMap()
    projects = project_map.projects

    if args.projects:
        projects_arg = args.projects.split(",")
        available_projects = [project.name for project in projects]

        # validate that given projects are present in the project map file
        for manual_project in projects_arg:
            if manual_project not in available_projects:
                parser.error("Project '{project}' is not found in "
                             "the project map file. Available projects are "
                             "{all}.".format(project=manual_project,
                                             all=available_projects))

        projects = [
            project.with_fields(enabled=project.name in projects_arg)
            for project in projects
        ]

    tester = SATestBuild.RegressionTester(args.jobs, projects,
                                          args.override_compiler,
                                          args.extra_analyzer_config,
                                          args.regenerate, args.strictness)
    tests_passed = tester.test_all()

    if not tests_passed:
        sys.stderr.write("ERROR: Tests failed.\n")
        sys.exit(42)
コード例 #2
0
ファイル: SATest.py プロジェクト: zhangqizhen1992/llvm-rv
def build(parser, args):
    import SATestBuild

    SATestBuild.VERBOSE = args.verbose

    projects = get_projects(parser, args.projects)
    tester = SATestBuild.RegressionTester(args.jobs, projects,
                                          args.override_compiler,
                                          args.extra_analyzer_config,
                                          args.regenerate, args.strictness)
    tests_passed = tester.test_all()

    if not tests_passed:
        sys.stderr.write("ERROR: Tests failed.\n")
        sys.exit(42)