Esempio n. 1
0
def _BuildServer(input_api):
  try:
    sys.path.insert(0, input_api.PresubmitLocalPath())
    import build_server
    build_server.main()
  finally:
    sys.path.pop(0)
Esempio n. 2
0
def main():
    build_server.printMajorHeader("Building")
    print(build_server.highlight("Built on: ") + time.strftime("%c"))
    os.chdir("./server")
    build_server.main()
    os.chdir("../")
    os.chdir("./tools")
    build_tools.main()
    os.chdir("../")
Esempio n. 3
0
#!/usr/bin/env python
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Run build_server so that files needed by tests are copied to the local
# third_party directory.
import build_server
build_server.main()

import logging
import optparse
import os
import sys
import time
import unittest

from local_renderer import LocalRenderer
from fake_fetchers import ConfigureFakeFetchers
from handler import Handler
from servlet import Request
from test_util import EnableLogging, DisableLogging

# Arguments set up if __main__ specifies them.
_EXPLICIT_TEST_FILES = None

def _ToPosixPath(os_path):
  return os_path.replace(os.sep, '/')

def _GetPublicFiles():
  '''Gets all public files mapped to their contents.
Esempio n. 4
0
# will render the documentation for the extension tabs API.
#
# On the other hand, render mode statically renders docs to stdout. Use this
# to save the output (more convenient than needing to save the page in a
# browser), handy when uploading the docs somewhere (e.g. for a review),
# and for profiling the server. For example,
#
#    ./preview.py -r extensions/tabs.html
#
# will output the documentation for the tabs API on stdout and exit immediately.

# NOTE: RUN THIS FIRST. Or all third_party imports will fail.
import build_server
# Copy all the files necessary to run the server. These are cleaned up when the
# server quits.
build_server.main()

from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import logging
import optparse
import posixpath
import time

from local_renderer import LocalRenderer


class _RequestHandler(BaseHTTPRequestHandler):
    '''A HTTPRequestHandler that outputs the docs page generated by Handler.
  '''
    def do_GET(self):
        # Sanitize path to guarantee that it stays within the server.