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()
示例#2
0
 def makeScript(self, distribution=None, args=[], all_derived=False):
     """Create a `PublishDistro` for `distribution`."""
     if distribution is None and not all_derived:
         distribution = self.makeDistro()
     distro_args = []
     if distribution is not None:
         distro_args.extend(['--distribution', distribution.name])
     if all_derived:
         distro_args.append('--all-derived')
     full_args = args + distro_args
     script = PublishDistro(test_args=full_args)
     script.distribution = distribution
     script.logger = DevNullLogger()
     return script
 def makeScript(self, distribution=None, args=[], all_derived=False):
     """Create a `PublishDistro` for `distribution`."""
     if distribution is None and not all_derived:
         distribution = self.makeDistro()
     distro_args = []
     if distribution is not None:
         distro_args.extend(['--distribution', distribution.name])
     if all_derived:
         distro_args.append('--all-derived')
     full_args = args + distro_args
     script = PublishDistro(test_args=full_args)
     script.distribution = distribution
     script.logger = DevNullLogger()
     return script
    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()
示例#5
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')