Esempio n. 1
0
def test_configure_accepts_custom_prefix(root):
    configure = Configure(".", prefix="/asdf")
    configure.cmd = mock.Mock()
    root.component += configure
    assert configure.prefix == "/asdf"
    root.component.deploy()
    assert " --prefix=/asdf" in configure.cmd.call_args[0][0]
Esempio n. 2
0
def test_configure_accepts_custom_prefix(root):
    configure = Configure('.', prefix='/asdf')
    configure.cmd = mock.Mock()
    root.component += configure
    assert configure.prefix == '/asdf'
    root.component.deploy()
    assert ' --prefix=/asdf' in configure.cmd.call_args[0][0]
Esempio n. 3
0
def test_configure_verifies_against_success_file(root):
    root.component += File("foo/config.status", content="", leading=True)
    configure = Configure("foo")
    configure.cmd = mock.Mock()
    root.component += configure
    root.component.deploy()
    root.component.deploy()
    assert 1 == configure.cmd.call_count
Esempio n. 4
0
def test_configure_defaults_prefix_to_workdir(root):
    configure = Configure(".")
    configure.cmd = mock.Mock()
    root.component += configure
    assert configure.prefix == root.component.workdir
    root.component.deploy()
    assert (" --prefix={}".format(root.component.workdir)
            in configure.cmd.call_args[0][0])
Esempio n. 5
0
    def configure(self):
        self += Package('libssl-dev')
        self += Package('libcurl4-gnutls-dev')

        self += Download(
            self.url.format(version=self.version), checksum=self.checksum)
        src = self._.target.replace('.zip', '')
        self += Extract(self._.target, create_target_dir=False)

        self += Patch(
            src + '/esniper.c',
            source='#define MIN_BIDTIME 5',
            target='#define MIN_BIDTIME 2')
        self += Configure(src, prefix='/usr/local')
        self += Make(src)