third_party/blink/tools/blinkpy/w3c/wpt_metadata_builder.py
def run(self, args=None):
        """Main entry point to parse flags and execute the script."""
        parser = argparse.ArgumentParser(description=__doc__)
        parser.add_argument(
            "--metadata-output-dir",
            help="The directory to output the metadata files into.")
        parser.add_argument(
            "--checked-in-metadata-dir",
            help="Root directory of any checked-in WPT metadata files to use. "
            "If set, these files will take precedence over legacy expectations "
            "and baselines when both exist for a test.")
        parser.add_argument(
            '-v',
            '--verbose',
            action='store_true',
            help='More verbose logging.')
        parser.add_argument(
            "--process-baselines",
            action="store_true",
            default=True,
            dest="process_baselines",
            help="Whether to translate baseline (-expected.txt) files into WPT "
            "metadata files. This translation is lossy and results in any "
            "subtest being accepted by wptrunner.")
        parser.add_argument("--no-process-baselines",
                            action="store_false",
                            dest="process_baselines")
        parser.add_argument(
            "--handle-annotations",
            action="store_true",
            default=True,
            dest="handle_annotations",
            help="Whether to handle annotations in expectations files. These "
            "are trailing comments that give additional details for how "
            "to translate an expectation into WPT metadata.")
        parser.add_argument("--no-handle-annotations",
                            action="store_false",
                            dest="handle_annotations")
        parser.add_argument(
            "--use-subtest-results",
            action="store_true",
            help="Treat subtest failures as test-level failures")
        args = parser.parse_args(args)

        log_level = logging.DEBUG if args.verbose else logging.INFO
        configure_logging(logging_level=log_level, include_time=True)

        self.metadata_output_dir = args.metadata_output_dir
        self.checked_in_metadata_dir = args.checked_in_metadata_dir
        self.process_baselines = args.process_baselines
        self.handle_annotations = args.handle_annotations
        self.use_subtest_results = args.use_subtest_results
        self._build_metadata_and_write()

        return 0
Main entry point to parse flags and execute the script.
Main entry point to parse flags and execute the script.
Main entry point to parse flags and execute the script .
def run(self, args=None):
        parser = argparse.ArgumentParser(description=__doc__)
        parser.add_argument(
            "--metadata-output-dir",
            help="The directory to output the metadata files into.")
        parser.add_argument(
            "--checked-in-metadata-dir",
            help="Root directory of any checked-in WPT metadata files to use. "
            "If set, these files will take precedence over legacy expectations "
            "and baselines when both exist for a test.")
        parser.add_argument(
            '-v',
            '--verbose',
            action='store_true',
            help='More verbose logging.')
        parser.add_argument(
            "--process-baselines",
            action="store_true",
            default=True,
            dest="process_baselines",
            help="Whether to translate baseline (-expected.txt) files into WPT "
            "metadata files. This translation is lossy and results in any "
            "subtest being accepted by wptrunner.")
        parser.add_argument("--no-process-baselines",
                            action="store_false",
                            dest="process_baselines")
        parser.add_argument(
            "--handle-annotations",
            action="store_true",
            default=True,
            dest="handle_annotations",
            help="Whether to handle annotations in expectations files. These "
            "are trailing comments that give additional details for how "
            "to translate an expectation into WPT metadata.")
        parser.add_argument("--no-handle-annotations",
                            action="store_false",
                            dest="handle_annotations")
        parser.add_argument(
            "--use-subtest-results",
            action="store_true",
            help="Treat subtest failures as test-level failures")
        args = parser.parse_args(args)
        log_level = logging.DEBUG if args.verbose else logging.INFO
        configure_logging(logging_level=log_level, include_time=True)
        self.metadata_output_dir = args.metadata_output_dir
        self.checked_in_metadata_dir = args.checked_in_metadata_dir
        self.process_baselines = args.process_baselines
        self.handle_annotations = args.handle_annotations
        self.use_subtest_results = args.use_subtest_results
        self._build_metadata_and_write()
        return 0
def run ( self , args = None ) : parser = argparse . ArgumentParser ( description = __doc__ ) parser . add_argument ( "--metadata-output-dir" , help = "The directory to output the metadata files into." ) parser . add_argument ( "--checked-in-metadata-dir" , help = "Root directory of any checked-in WPT metadata files to use. " "If set, these files will take precedence over legacy expectations " "and baselines when both exist for a test." ) parser . add_argument ( '-v' , '--verbose' , action = 'store_true' , help = 'More verbose logging.' ) parser . add_argument ( "--process-baselines" , action = "store_true" , default = True , dest = "process_baselines" , help = "Whether to translate baseline (-expected.txt) files into WPT " "metadata files. This translation is lossy and results in any " "subtest being accepted by wptrunner." ) parser . add_argument ( "--no-process-baselines" , action = "store_false" , dest = "process_baselines" ) parser . add_argument ( "--handle-annotations" , action = "store_true" , default = True , dest = "handle_annotations" , help = "Whether to handle annotations in expectations files. These " "are trailing comments that give additional details for how " "to translate an expectation into WPT metadata." ) parser . add_argument ( "--no-handle-annotations" , action = "store_false" , dest = "handle_annotations" ) parser . add_argument ( "--use-subtest-results" , action = "store_true" , help = "Treat subtest failures as test-level failures" ) args = parser . parse_args ( args ) log_level = logging . DEBUG if args . verbose else logging . INFO configure_logging ( logging_level = log_level , include_time = True ) self . metadata_output_dir = args . metadata_output_dir self . checked_in_metadata_dir = args . checked_in_metadata_dir self . process_baselines = args . process_baselines self . handle_annotations = args . handle_annotations self . use_subtest_results = args . use_subtest_results self . _build_metadata_and_write ( ) return 0
Main entry point to parse flags and execute the script.
Main entry point to parse flags and execute the script .
"""Main entry point to parse flags and execute the script."""
self
args