def run(self, args): opts = setup_build_options(args) ctx_gen = opts.get_context_generator(facebook_internal=args.facebook_internal) if args.test_all: ctx_gen.set_value_for_all_projects("test", "on") else: ctx_gen.set_value_for_project(args.project, "test", "on") loader = ManifestLoader(opts, ctx_gen) manifest = loader.load_manifest(args.project) projects = loader.manifests_in_dependency_order() # Accumulate the install directories so that the test steps # can find their dep installation install_dirs = [] for m in projects: inst_dir = loader.get_project_install_dir(m) if m == manifest or args.test_all: built_marker = os.path.join(inst_dir, ".built-by-getdeps") if not os.path.exists(built_marker): print("project %s has not been built" % m.name) # TODO: we could just go ahead and build it here, but I # want to tackle that as part of adding build-for-test # support. return 1 fetcher = loader.create_fetcher(m) src_dir = fetcher.get_src_dir() ctx = ctx_gen.get_context(m.name) build_dir = loader.get_project_build_dir(m) builder = m.create_builder(opts, src_dir, build_dir, inst_dir, ctx) builder.run_tests(install_dirs, schedule_type=args.schedule_type) install_dirs.append(inst_dir)
def run(self, args): opts = setup_build_options(args) ctx_gen = opts.get_context_generator(facebook_internal=args.facebook_internal) if args.enable_tests: ctx_gen.set_value_for_project(args.project, "test", "on") loader = ManifestLoader(opts, ctx_gen) if args.clean: clean_dirs(opts) manifest = loader.load_manifest(args.project) print("Building on %s" % ctx_gen.get_context(args.project)) projects = loader.manifests_in_dependency_order() # Accumulate the install directories so that the build steps # can find their dep installation install_dirs = [] for m in projects: fetcher = loader.create_fetcher(m) if args.clean: fetcher.clean() build_dir = loader.get_project_build_dir(m) inst_dir = loader.get_project_install_dir(m) if m == manifest or not args.no_deps: print("Assessing %s..." % m.name) change_status = fetcher.update() reconfigure = change_status.build_changed() sources_changed = change_status.sources_changed() project_hash = loader.get_project_hash(m) built_marker = os.path.join(inst_dir, ".built-by-getdeps") if os.path.exists(built_marker): with open(built_marker, "r") as f: built_hash = f.read().strip() if built_hash != project_hash: # Some kind of inconsistency with a prior build, # let's run it again to be sure os.unlink(built_marker) reconfigure = True if sources_changed or reconfigure or not os.path.exists(built_marker): if os.path.exists(built_marker): os.unlink(built_marker) src_dir = fetcher.get_src_dir() ctx = ctx_gen.get_context(m.name) builder = m.create_builder(opts, src_dir, build_dir, inst_dir, ctx) builder.build(install_dirs, reconfigure=reconfigure) with open(built_marker, "w") as f: f.write(project_hash) install_dirs.append(inst_dir)
def run(self, args): opts = setup_build_options(args) loader = ManifestLoader(opts) loader.ctx_gen.set_value_for_project(args.project, "test", "on") manifest = loader.load_manifest(args.project) projects = loader.manifests_in_dependency_order() if args.recursive: manifests = projects else: manifests = [manifest] for m in manifests: inst_dir = loader.get_project_install_dir(m) print(inst_dir)
def run(self, args): opts = setup_build_options(args) ctx_gen = opts.get_context_generator(facebook_internal=args.facebook_internal) if args.enable_tests: ctx_gen.set_value_for_project(args.project, "test", "on") loader = ManifestLoader(opts, ctx_gen) manifest = loader.load_manifest(args.project) projects = loader.manifests_in_dependency_order() # Accumulate the install directories so that the build steps # can find their dep installation install_dirs = [] for m in projects: inst_dir = loader.get_project_install_dir(m) install_dirs.append(inst_dir) if m == manifest: dep_munger = create_dyn_dep_munger(opts, install_dirs) dep_munger.process_deps(args.destdir, args.final_install_prefix)