示例#1
0
    def _download_and_save(self):
        dist = self._download(use_link=True)
        if self.download_link.endswith('.zip'):
            self.log.info("Unzipping %s to %s", dist, self.dest)
            unzip(dist, self.dest)
        else:
            self.log.info("Untaring %s to %s", dist, self.dest)
            untar(dist, self.dest)
        os.remove(dist)

        if not is_windows():
            os.chmod(self.tool_path, 0o755)
示例#2
0
    def install(self):
        _dir = self.get_dir()
        if not os.path.exists(_dir):
            os.makedirs(_dir)

        dist = self._download(use_link=True)
        if dist:
            if self.download_link.endswith('.zip'):
                self.log.info("Unzipping %s to %s", dist, _dir)
                unzip(dist, self.get_dir())
            else:
                self.log.info("Untaring %s to %s", dist, _dir)
                untar(dist, _dir)
            os.remove(dist)

            if not is_windows():
                os.chmod(self.tool_path, 0o755)
示例#3
0
    def install(self):
        if is_windows():
            raise ToolError("Unable to install Vegeta on Windows! Manual installation required.")

        dest = get_full_path(self.tool_path, step_up=1)
        if not os.path.exists(dest):
            os.makedirs(dest)

        self.log.info("Will install %s into %s", self.tool_name, dest)
        vegeta_dist = self._download(use_link=True)

        self.log.info("Untaring %s", vegeta_dist)
        untar(vegeta_dist, dest, rel_path='vegeta')
        os.remove(vegeta_dist)
        os.chmod(get_full_path(self.tool_path), 0o755)
        self.log.info("Installed Vegeta successfully")

        if not self.check_if_installed():
            raise ToolError("Unable to run %s after installation!" % self.tool_name)
示例#4
0
    def install(self):
        dest = self.get_driver_dir()
        if not os.path.exists(dest):
            os.makedirs(dest)

        self.log.info("Will install %s into %s", self.tool_name, dest)
        dist = self._download(use_link=True)
        try:
            if self.download_link.endswith('.zip'):
                self.log.info("Unzipping %s to %s", dist, dest)
                unzip(dist, dest)
            else:
                self.log.info("Untaring %s to %s", dist, dest)
                untar(dist, dest)
        finally:
            os.remove(dist)

        if not is_windows():
            os.chmod(self.tool_path, 0o755)

        if not self.check_if_installed():
            raise ToolError("Unable to find %s after installation!" % self.tool_name)
示例#5
0
    def install(self):
        dest = self.get_driver_dir()
        if not os.path.exists(dest):
            os.makedirs(dest)

        self.log.info("Will install %s into %s", self.tool_name, dest)
        dist = self._download(use_link=True)
        try:
            if self.download_link.endswith('.zip'):
                self.log.info("Unzipping %s to %s", dist, dest)
                unzip(dist, dest)
            else:
                self.log.info("Untaring %s to %s", dist, dest)
                untar(dist, dest)
        finally:
            os.remove(dist)

        if not is_windows():
            os.chmod(self.tool_path, 0o755)

        if not self.check_if_installed():
            raise ToolError("Unable to find %s after installation!" % self.tool_name)