Ejemplo n.º 1
0
    def execute(self, options, args, tool):
        print(
            "This command runs a local HTTP server that changes your working copy"
        )
        print("based on the actions you take in the web-based UI.")

        args = {}
        if options.platform:
            # FIXME: This assumes that the port implementation (chromium-, gtk-, etc.) is the first part of options.platform.
            args['platform'] = options.platform.split('-')[0]
            builder = builders.builder_name_for_port_name(options.platform)
            if builder:
                args['builder'] = builder
        if options.results_directory:
            args['useLocalResults'] = "true"

        httpd = GardeningHTTPServer(httpd_port=8127,
                                    config={
                                        'tool': tool,
                                        'options': options
                                    })
        self._tool.user.open_url(httpd.url(args))

        print("Local HTTP server started.")
        httpd.serve_forever()
Ejemplo n.º 2
0
    def execute(self, options, args, tool):
        print "This command runs a local HTTP server that changes your working copy"
        print "based on the actions you take in the web-based UI."

        httpd = GardeningHTTPServer(httpd_port=8127, config={'tool': tool})
        self._tool.user.open_url(httpd.url())

        print "Local HTTP server started."
        httpd.serve_forever()
Ejemplo n.º 3
0
    def execute(self, options, args, tool):
        print "This command runs a local HTTP server that changes your working copy"
        print "based on the actions you take in the web-based UI."

        args = {}
        if options.platform:
            # FIXME: This assumes that the port implementation (chromium-, gtk-, etc.) is the first part of options.platform.
            args['platform'] = options.platform.split('-')[0]
            builder = builders.builder_name_for_port_name(options.platform)
            if builder:
                args['builder'] = builder
        if options.results_directory:
            args['useLocalResults'] = "true"

        httpd = GardeningHTTPServer(httpd_port=8127, config={'tool': tool, 'options': options})
        self._tool.user.open_url(httpd.url(args))

        print "Local HTTP server started."
        httpd.serve_forever()
Ejemplo n.º 4
0
 def execute(self, options, args, tool):
     self._tool.user.open_url(self.url)
     httpd = GardeningHTTPServer(httpd_port=8127, config={'tool': tool})
     httpd.serve_forever()