def Main(args):
    parser = argparse.ArgumentParser(
        description='Run tracing development server')
    parser.add_argument('-d',
                        '--data-dir',
                        default=os.path.abspath(
                            os.path.join(_ROOT_PATH, 'test_data')))
    parser.add_argument('-p', '--port', default=8003, type=int)
    args = parser.parse_args()

    project = trace_viewer_project.TraceViewerProject()

    server = tvcm.DevServer(port=args.port, project=project)
    server.data_dir = os.path.abspath(args.data_dir)
    project.source_paths.append(server.data_dir)

    server.AddPathHandler('/json/examples', do_GET_json_examples)
    server.AddPathHandler('/tr/json/tests', do_GET_json_tests)
    server.AddPathHandler('/json/examples/skp', do_GET_json_examples_skp)

    server.AddSourcePathMapping(project.trace_viewer_path)
    server.AddTestLink('/examples/skia_debugger.html', 'Skia Debugger')
    server.AddTestLink('/examples/trace_viewer.html', 'Trace File Viewer')

    server.AddPathHandler('/test_automation/notify_test_result',
                          do_POST_report_test_results,
                          supports_post=True)
    server.AddPathHandler('/test_automation/notify_completion',
                          do_POST_report_test_completion,
                          supports_post=True)

    server.serve_forever()
예제 #2
0
def Main(port, args):
  project = trace_viewer_project.TraceViewerProject()

  server = tvcm.DevServer(port=port, project=project)
  server.AddPathHandler('/json/examples', do_GET_json_examples)
  server.AddPathHandler('/json/examples/skp', do_GET_json_examples_skp)

  server.AddSourcePathMapping(project.trace_viewer_path)
  server.AddTestLink('/examples/skia_debugger.html', 'Skia Debugger')
  server.AddTestLink('/examples/trace_viewer.html', 'Trace File Viewer')
  server.serve_forever()
예제 #3
0
def Main(port, args):
    parser = optparse.OptionParser()
    _, args = parser.parse_args(args)

    project = spy_project.SpyProject()
    server = tvcm.DevServer(port=port, project=project)

    def IsTestModuleResourcePartOfSpy(module_resource):
        return module_resource.absolute_path.startswith(project.spy_path)

    server.test_module_resource_filter = IsTestModuleResourcePartOfSpy
    return server.serve_forever()
예제 #4
0
def Main(port, args):
    parser = optparse.OptionParser()
    _, args = parser.parse_args(args)

    project = web_components_project.WebComponentsProject()
    server = tvcm.DevServer(port=port, project=project)

    def IsTestModuleResourcePartOfTelemetry(module_resource):
        return module_resource.absolute_path.startswith(project.telemetry_path)

    server.test_module_resource_filter = IsTestModuleResourcePartOfTelemetry
    return server.serve_forever()
def Main(args):
    port = 8003
    project = trace_viewer_project.TraceViewerProject()

    server = tvcm.DevServer(port=port, project=project)
    server.AddPathHandler('/json/examples', do_GET_json_examples)
    server.AddPathHandler('/tv/json/tests', do_GET_json_tests)
    server.AddPathHandler('/json/examples/skp', do_GET_json_examples_skp)

    server.AddSourcePathMapping(project.trace_viewer_path)
    server.AddTestLink('/examples/skia_debugger.html', 'Skia Debugger')
    server.AddTestLink('/examples/trace_viewer.html', 'Trace File Viewer')

    server.AddPathHandler('/test_automation/notify_test_result',
                          do_POST_report_test_results,
                          supports_post=True)
    server.AddPathHandler('/test_automation/notify_completion',
                          do_POST_report_test_completion,
                          supports_post=True)

    server.serve_forever()