fix build with boost-1.36
[libtorrent.git] / docs / running_tests.html
blobfd962557cdf2a3b71b71c96d241bd7600e79bc97
1 <?xml version="1.0" encoding="utf-8" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
7 <title>libtorrent manual</title>
8 <meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
9 <link rel="stylesheet" href="style.css" type="text/css" />
10 </head>
11 <body>
12 <div class="document" id="libtorrent-manual">
13 <h1 class="title">libtorrent manual</h1>
14 <table class="docinfo" frame="void" rules="none">
15 <col class="docinfo-name" />
16 <col class="docinfo-content" />
17 <tbody valign="top">
18 <tr><th class="docinfo-name">Author:</th>
19 <td>Arvid Norberg, <a class="last reference external" href="mailto:arvid&#64;rasterbar.com">arvid&#64;rasterbar.com</a></td></tr>
20 </tbody>
21 </table>
22 <div class="contents topic" id="table-of-contents">
23 <p class="topic-title first">Table of contents</p>
24 <ul class="simple">
25 <li><a class="reference internal" href="#running-and-building-tests" id="id3">running and building tests</a></li>
26 <li><a class="reference internal" href="#id1" id="id4">lighty</a></li>
27 <li><a class="reference internal" href="#delegate" id="id5">delegate</a></li>
28 <li><a class="reference internal" href="#openssl" id="id6">OpenSSL</a></li>
29 </ul>
30 </div>
31 <div class="section" id="running-and-building-tests">
32 <h1>running and building tests</h1>
33 <p>Some of the tests of libtorrent are not self contained. For instance, in
34 order to test the <tt class="docutils literal"><span class="pre">http_connection</span></tt> class in libtorrent, the test requires
35 <a class="reference external" href="http://www.lighttpd.net">lighty</a>. This document outlines the requirements of the tests as well as
36 describes how to set up your environment to be able to run them.</p>
37 </div>
38 <div class="section" id="id1">
39 <h1>lighty</h1>
40 <p>Download <a class="reference external" href="http://www.lighttpd.net">lighty</a>. I've tested with <tt class="docutils literal"><span class="pre">lighttpd-1.4.19</span></tt>. If libtorrent is built
41 with SSL support (which it is by default), lighty needs SSL support as well.</p>
42 <p>To build lighty with SSL support do:</p>
43 <pre class="literal-block">
44 ./configure --with-openssl
45 </pre>
46 <p>Followed by:</p>
47 <pre class="literal-block">
48 sudo make install
49 </pre>
50 <p>Make sure you have SSL support in lighty by running:</p>
51 <pre class="literal-block">
52 lighttpd -V
53 </pre>
54 <p>Which gives you a list of all enabled features.</p>
55 </div>
56 <div class="section" id="delegate">
57 <h1>delegate</h1>
58 <p><a class="reference external" href="http://www.delegate.org">Delegate</a> can act as many different proxies, which makes it a convenient
59 tool to use to test libtorrent's support for SOCKS4, SOCKS5, HTTPS and
60 HTTP proxies.</p>
61 <p>You can download prebuilt binaries for the most common platforms on
62 <a class="reference external" href="http://www.delegate.org/delegate/download/">deletate's download page</a>. Make sure to name the executable <tt class="docutils literal"><span class="pre">delegated</span></tt>
63 and put it in a place where a shell can pick it up, in its <tt class="docutils literal"><span class="pre">PATH</span></tt>. For
64 instance <tt class="docutils literal"><span class="pre">/bin</span></tt>.</p>
65 </div>
66 <div class="section" id="openssl">
67 <h1>OpenSSL</h1>
68 <p>In order to create an SSL certificate for <a class="reference external" href="http://www.lighttpd.net">lighty</a>, openssl is used. More
69 specifically, the following command is issued by the test to create the
70 certificate file:</p>
71 <pre class="literal-block">
72 echo -e &quot;AU\ntest province\ntest city\ntest company\ntest department\n\
73 tester\ntest&#64;test.com&quot; | openssl req -new -x509 -keyout server.pem \
74 -out server.pem -days 365 -nodes
75 </pre>
76 <p>This will write <tt class="docutils literal"><span class="pre">server.pem</span></tt> which is referenced in the lighty
77 confiuration file.</p>
78 <p>OpenSSL comes installed with most Linux and BSD distros, including Mac OS X.
79 You can download it from <a class="reference external" href="http://www.openssl.org/">the openssl homepage</a>.</p>
80 </div>
81 </div>
82 </body>
83 </html>