def test_simple_distutils(self): top_node = self.top_node create_fake_package_from_bento_info(top_node, BENTO_INFO_WITH_EXT) conf, configure = prepare_configure(top_node, BENTO_INFO_WITH_EXT, DistutilsConfigureContext) configure.run(conf) conf.shutdown() build = BuildCommand() opts = OptionsContext.from_command(build) bld = DistutilsBuildContext([], opts, conf.pkg, top_node) build.run(bld)
def test_simple(self): root = self.root top_node = root.find_node(self.d) create_fake_package_from_bento_info(top_node, BENTO_INFO) conf, configure = prepare_configure(top_node, BENTO_INFO, ConfigureYakuContext) configure.run(conf) conf.shutdown() build = BuildCommand() opts = OptionsContext.from_command(build) bld = BuildYakuContext([], opts, conf.pkg, top_node) build.run(bld)
def test_simple_waf(self): from bento.commands.extras.waf import ConfigureWafContext, BuildWafContext, make_stream_logger, register_options top_node = self.top_node create_fake_package_from_bento_info(top_node, BENTO_INFO_WITH_EXT) conf, configure = prepare_configure(top_node, BENTO_INFO_WITH_EXT, ConfigureWafContext) configure.run(conf) conf.shutdown() build = BuildCommand() # opts = OptionsContext.from_command(build) opts = prepare_options("build", build, BuildWafContext) bld = BuildWafContext(None, [], opts, conf.pkg, top_node) bld.waf_context.logger = make_stream_logger("build", cStringIO()) build.run(bld)
def test_simple(self): root = self.root top_node = self.top_node run_node = self.run_node bento_info = """\ Name: foo Recurse: bar """ bento_info2 = """\ Recurse: foo Library: Modules: fubar Extension: _foo Sources: foo.c """ bento_info3 = """\ Library: Modules: foufoufou Packages: sub2 """ bentos = {"bento.info": bento_info, os.path.join("bar", "bento.info"): bento_info2, os.path.join("bar", "foo", "bento.info"): bento_info3} create_fake_package_from_bento_infos(run_node, bentos) conf, configure = prepare_configure(run_node, bento_info, ConfigureYakuContext) configure.run(conf) conf.shutdown() build = BuildCommand() opts = OptionsContext.from_command(build) cmd_argv = [] bld = BuildYakuContext(cmd_argv, opts, conf.pkg, run_node) build.run(bld)