1#!/usr/bin/env lucicfg generate 2# Copyright 2023 The ChromiumOS Authors 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6"""Main entry point to generate the Suite and SuiteSet protos.""" 7 8load("//proto/proto.star", "chromiumos_descpb") 9 10chromiumos_descpb.register() 11 12load("//compiled_suites.star", "compiled_suites") 13load("//compiled_suite_sets.star", "compiled_suite_sets") 14 15def suites_generator(ctx): 16 ctx.output["suites.jsonpb"] = proto.to_jsonpb(compiled_suites) 17 18def suite_sets_generator(ctx): 19 ctx.output["suite_sets.jsonpb"] = proto.to_jsonpb(compiled_suite_sets) 20 21def main(): 22 lucicfg.generator(impl = suites_generator) 23 lucicfg.generator(impl = suite_sets_generator) 24 25main() 26