5 :Author: Arvid Norberg, arvid@rasterbar.com
7 .. contents:: Table of contents
11 running and building tests
12 ==========================
14 Some of the tests of libtorrent are not self contained. For instance, in
15 order to test the ``http_connection`` class in libtorrent, the test requires
16 lighty_. This document outlines the requirements of the tests as well as
17 describes how to set up your environment to be able to run them.
19 .. _lighty: http://www.lighttpd.net
24 Download lighty_. I've tested with ``lighttpd-1.4.19``. If libtorrent is built
25 with SSL support (which it is by default), lighty needs SSL support as well.
27 To build lighty with SSL support do::
29 ./configure --with-openssl
35 Make sure you have SSL support in lighty by running::
39 Which gives you a list of all enabled features.
44 Delegate_ can act as many different proxies, which makes it a convenient
45 tool to use to test libtorrent's support for SOCKS4, SOCKS5, HTTPS and
48 .. _Delegate: http://www.delegate.org
50 You can download prebuilt binaries for the most common platforms on
51 `deletate's download page`_. Make sure to name the executable ``delegated``
52 and put it in a place where a shell can pick it up, in its ``PATH``. For
55 .. _`deletate's download page`: http://www.delegate.org/delegate/download/
60 In order to create an SSL certificate for lighty_, openssl is used. More
61 specifically, the following command is issued by the test to create the
64 echo -e "AU\ntest province\ntest city\ntest company\ntest department\n\
65 tester\ntest@test.com" | openssl req -new -x509 -keyout server.pem \
66 -out server.pem -days 365 -nodes
68 This will write ``server.pem`` which is referenced in the lighty
71 OpenSSL comes installed with most Linux and BSD distros, including Mac OS X.
72 You can download it from `the openssl homepage`_.
74 .. _`the openssl homepage`: http://www.openssl.org/