def runPublishDistro(self, distribution, args=[], suites=None):
        """Execute `publish-distro`."""
        if suites is None:
            suites = []
        arguments = (['-d', distribution.name] + args +
                     sum([['-s', suite] for suite in suites], []))

        publish_distro = PublishDistro(test_args=arguments, logger=self.logger)
        publish_distro.logger = self.logger
        publish_distro.txn = self.txn
        publish_distro.main()
    def runPublishDistro(self, distribution, args=[], suites=None):
        """Execute `publish-distro`."""
        if suites is None:
            suites = []
        arguments = (
            ['-d', distribution.name] +
            args +
            sum([['-s', suite] for suite in suites], []))

        publish_distro = PublishDistro(
            test_args=arguments, logger=self.logger)
        publish_distro.logger = self.logger
        publish_distro.txn = self.txn
        publish_distro.main()
Example #3
0
    def runPublishDistro(self, extra_args=None, distribution="ubuntutest"):
        """Run publish-distro without invoking the script.

        This method hooks into the publishdistro module to run the
        publish-distro script without the overhead of using Popen.
        """
        args = ["-d", distribution]
        if extra_args is not None:
            args.extend(extra_args)
        publish_distro = PublishDistro(test_args=args)
        publish_distro.logger = BufferLogger()
        publish_distro.txn = self.layer.txn
        switch_dbuser(config.archivepublisher.dbuser)
        publish_distro.main()
        switch_dbuser('launchpad')
    def runPublishDistro(self, extra_args=None, distribution="ubuntutest"):
        """Run publish-distro without invoking the script.

        This method hooks into the publishdistro module to run the
        publish-distro script without the overhead of using Popen.
        """
        args = ["-d", distribution]
        if extra_args is not None:
            args.extend(extra_args)
        publish_distro = PublishDistro(test_args=args)
        publish_distro.logger = BufferLogger()
        publish_distro.txn = self.layer.txn
        switch_dbuser(config.archivepublisher.dbuser)
        publish_distro.main()
        switch_dbuser('launchpad')