def main(): options = parse_args() if not build_utils.run_cmake(force_clean=options.clobber, log_output=True, debug_build=options.debug): sys.exit(1) print("Building all targets with Ninja ...\n") if not build_utils.run_ninja(["all"], fail_fast=True): sys.exit(1) print("Pytype built successfully!\n")
def main(): opts = parse_args() targets = opts.targets or ["test_all"] if not build_utils.run_cmake(log_output=True, debug_build=opts.debug): sys.exit(1) fail_collector = build_utils.FailCollector(opts.verbose) print("Running tests (build steps will be executed as required) ...\n") if not build_utils.run_ninja(targets, fail_collector, opts.fail_fast): fail_collector.print_report() sys.exit(1) print("!!! All tests passed !!!\n" "Some tests might not have been run because they were already passing.")
def generate_files(): """Run flex and bison to produce the parser .cc and .h files.""" if not build_utils.run_cmake(force_clean=True): raise ReleaseError("Running CMake failed!") ninja_cmd = ["ninja", "pytype.pyi.parser_gen", "pytype.pyi.lexer"] print("Building flex and bison outputs ...\n") returncode, stdout = _run_cmd(ninja_cmd, cwd=build_utils.OUT_DIR) if returncode != 0: raise ReleaseError("Error generating the Flex and Bison outputs:\n%s" % stdout) # Copy the generated files into the source tree. for gen_file in GEN_FILE_LIST: print("Copying %s to source tree ...\n" % gen_file) shutil.copy(os.path.join(OUT_PYI_DIR, gen_file), os.path.join(SRC_PYI_DIR, gen_file))
def main(): opts = parse_args() modules = opts.modules or ["test_all"] if not build_utils.run_cmake(log_output=True): sys.exit(1) fail_collector = FailCollector() # PyType's target names use the dotted name convention. So, the fully # qualified test module names are actually ninja target names. print("Running tests (build steps will be executed as required) ...\n") if not run_ninja(modules, fail_collector, fail_fast=opts.fail_fast): fail_collector.print_report() sys.exit(1) print( "!!! All tests passed !!!\n" "Some tests might not have been run because they were already passing." )
def main(): modules = parse_args() if not modules: modules = ["test_all"] if not build_utils.run_cmake(): sys.exit(1) fail_collector = FailCollector() # PyType's target names use the dotted name convention. So, the fully # qualified test module names are actually ninja target names. print("Building ...\n") if not run_ninja(["all"], None): sys.exit(1) print("Running tests ...\n") if not run_ninja(modules, fail_collector): fail_collector.print_report() sys.exit(1) print( "!!! All tests passed !!!\n" "Some tests might not have been run because they were already passing." )