Esempio 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()
Esempio n. 2
0
    def _add_tests_to_rebaseline_for_port(self, port_name):
        builder_name = builders.builder_name_for_port_name(port_name)
        if not builder_name:
            return
        tests = self._tests_to_rebaseline(self._tool.port_factory.get(port_name)).items()

        if tests:
            _log.info("Retrieving results for %s from %s." % (port_name, builder_name))

        for test_name, suffixes in tests:
            _log.info("    %s (%s)" % (test_name, ','.join(suffixes)))
            if test_name not in self._test_list:
                self._test_list[test_name] = {}
            self._test_list[test_name][builder_name] = suffixes
Esempio 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()