Exemplo n.º 1
0
    def test_cross_compile(self):
        plugin = waf.WafPlugin("test-part", self.options, self.project_options)
        # This shouldn't raise an exception
        plugin.enable_cross_compilation()

        env = plugin.env(plugin.sourcedir)
        self.assertIn("CC={}-gcc".format(self.project_options.arch_triplet), env)
        self.assertIn("CXX={}-g++".format(self.project_options.arch_triplet), env)
Exemplo n.º 2
0
    def waf_build(self):
        """Helper to call a full build"""
        plugin = waf.WafPlugin('test-part', self.options, self.project_options)
        os.makedirs(plugin.sourcedir)

        # Create fake waf
        open(os.path.join(plugin.sourcedir, 'waf'), 'w').close()

        plugin.build()

        return plugin
Exemplo n.º 3
0
    def waf_build(self):
        """Helper to call a full build"""
        plugin = waf.WafPlugin("test-part", self.options, self.project)
        os.makedirs(plugin.sourcedir)

        # Create fake waf
        open(os.path.join(plugin.sourcedir, "waf"), "w").close()

        plugin.build()

        return plugin