Exemple #1
0
 def build(self):
     m1 = Make(self, makefile='/tmp/makefile')
     m1.set_var('prefix', '/foo')
     m2 = Make(self, jobs=2)
     return (m1.cmdline()['cmd'],
             m2.cmdline(['clean', 'install'])['cmd'],
             m2.cmdline('all')['cmd'])
Exemple #2
0
def test_custom_repr():
    """Test yaml custom repr for Make."""
    Anod.sandbox = SandBox()
    Anod.sandbox.root_dir = os.getcwd()
    Anod.sandbox.create_dirs()

    ac = Anod(qualifier='', kind='build', jobs=1)
    AnodDriver(anod_instance=ac, store=None).activate(Anod.sandbox, None)

    m = Make(ac, exec_dir='/here', makefile='/tmp/makefile')
    AnodDriver(anod_instance=ac, store=None).activate(Anod.sandbox, None)
    ac.build_space.create()
    assert "cmd: [make, -f, /tmp/makefile, -j, '1']" in yaml.dump(m)
Exemple #3
0
 def build(self):
     m1 = Make(self, makefile="/tmp/makefile")
     m1.set_var("prefix", "/foo")
     m2 = Make(self, jobs=2)
     m2.set_default_target("install")
     m2.set_var("profiles", ["dev", "prod"])
     return (
         m1.cmdline()["cmd"],
         m1()[0],
         m1(exec_dir="/foo", timeout=2)[1],
         m2.cmdline()["cmd"],
         m2.cmdline(["clean", "install"])["cmd"],
         m2.cmdline("all")["cmd"],
     )
 def build(self):
     m = Make(self)
     return m.cmdline()
Exemple #5
0
 def build(self):
     m1 = Make(self, makefile='/tmp/makefile')
     m1.set_var('prefix', '/foo')
     m2 = Make(self, jobs=2)
     m2.set_default_target('install')
     m2.set_var('profiles', ['dev', 'prod'])
     return (m1.cmdline()['cmd'], m2.cmdline()['cmd'],
             m2.cmdline(['clean',
                         'install'])['cmd'], m2.cmdline('all')['cmd'])