2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
9 1. OpenSSL library - http://www.openssl.org/
10 2. Python interface to the OpenSSL library - https://launchpad.net/pyopenssl
13 python run.py -t <test_dir>
16 from optparse
import OptionParser
19 import playback_driver
24 driver
= playback_driver
.PlaybackRequestHandler(options
.test_dir
)
25 httpd
= proxy_handler
.CreateServer(driver
, options
.port
)
26 sa
= httpd
.socket
.getsockname()
27 print "Serving HTTP on", sa
[0], "port", sa
[1], "..."
32 parser
= OptionParser()
33 parser
.add_option("-t", "--test-dir", dest
="test_dir",
34 help="directory containing recorded test data")
35 parser
.add_option("-p", "--port", dest
="port", type="int", default
=8000)
36 options
= parser
.parse_args()[0]
37 if not options
.test_dir
:
38 raise Exception('please specify test directory')
43 if __name__
== '__main__':