added documentation how to set up an environment to run the libtorrent tests

This commit is contained in:
Arvid Norberg 2008-03-21 04:52:12 +00:00
parent ee92504aad
commit a8ed63494a
5 changed files with 193 additions and 31 deletions

View File

@ -4,6 +4,7 @@ EXTRA_DIST = docs/manual.html docs/manual.rst docs/extension_protocol.rst \
docs/extension_protocol.html docs/udp_tracker_protocol.rst \
docs/projects.rst docs/projects.html \
docs/building.rst docs/building.html \
docs/running_tests.rst docs/running_tests.html \
docs/python_binding.rst docs/python_binding.html \
docs/arctic_thumb.png \
docs/bitbuddy_thumb.jpg \

View File

@ -12,53 +12,54 @@
<div id="librarySidebar"><ul class="simple">
<li><a class="reference" href="http://sourceforge.net/project/showfiles.php?group_id=79942">download</a></li>
<li><a class="reference" href="features.html">features</a></li>
<li><a class="reference" href="building.html">building libtorrent</a></li>
<li><a class="reference" href="examples.html">examples</a></li>
<li><a class="reference" href="manual.html">api documentation</a></li>
<li><a class="reference" href="client_test.png">screenshot</a></li>
<li><a class="reference" href="http://lists.sourceforge.net/lists/listinfo/libtorrent-discuss">mailing list</a> (<a class="reference" href="http://dir.gmane.org/gmane.network.bit-torrent.libtorrent">archive</a>)</li>
<li><a class="reference" href="projects.html">who's using libtorrent?</a></li>
<li><a class="reference" href="http://code.rasterbar.com/libtorrent/newticket">report bugs</a></li>
<li><a class="reference" href="http://www.sourceforge.net/projects/libtorrent">sourceforge page</a></li>
<li><a class="reference" href="http://code.rasterbar.com/libtorrent">wiki</a></li>
<li><a class="reference external" href="http://sourceforge.net/project/showfiles.php?group_id=79942">download</a></li>
<li><a class="reference external" href="features.html">features</a></li>
<li><a class="reference external" href="building.html">building libtorrent</a></li>
<li><a class="reference external" href="examples.html">examples</a></li>
<li><a class="reference external" href="manual.html">api documentation</a></li>
<li><a class="reference external" href="running_tests.html">running tests</a></li>
<li><a class="reference external" href="client_test.png">screenshot</a></li>
<li><a class="reference external" href="http://lists.sourceforge.net/lists/listinfo/libtorrent-discuss">mailing list</a> (<a class="reference external" href="http://dir.gmane.org/gmane.network.bit-torrent.libtorrent">archive</a>)</li>
<li><a class="reference external" href="projects.html">who's using libtorrent?</a></li>
<li><a class="reference external" href="http://code.rasterbar.com/libtorrent/newticket">report bugs</a></li>
<li><a class="reference external" href="http://www.sourceforge.net/projects/libtorrent">sourceforge page</a></li>
<li><a class="reference external" href="http://code.rasterbar.com/libtorrent">wiki</a></li>
</ul>
<hr class="docutils" />
<p>Extensions</p>
<ul class="simple">
<li><a class="reference" href="extension_protocol.html">extensions protocol</a></li>
<li><a class="reference" href="libtorrent_plugins.html">plugin interface</a></li>
<li><a class="reference" href="dht_extensions.html">DHT extensions</a></li>
<li><a class="reference" href="udp_tracker_protocol.html">UDP tracker protocol</a></li>
<li><a class="reference" href="http://www.getright.com/seedtorrent.html">HTTP seed</a></li>
<li><a class="reference" href="http://home.elp.rr.com/tur/multitracker-spec.txt">multitracker</a></li>
<li><a class="reference external" href="extension_protocol.html">extensions protocol</a></li>
<li><a class="reference external" href="libtorrent_plugins.html">plugin interface</a></li>
<li><a class="reference external" href="dht_extensions.html">DHT extensions</a></li>
<li><a class="reference external" href="udp_tracker_protocol.html">UDP tracker protocol</a></li>
<li><a class="reference external" href="http://www.getright.com/seedtorrent.html">HTTP seed</a></li>
<li><a class="reference external" href="http://home.elp.rr.com/tur/multitracker-spec.txt">multitracker</a></li>
</ul>
<hr class="docutils" />
<p>Bindings</p>
<ul class="simple">
<li><a class="reference" href="http://libtorrent-ruby.rubyforge.org/">ruby bindings</a></li>
<li><a class="reference" href="python_binding.html">python bindings</a></li>
<li><a class="reference external" href="http://libtorrent-ruby.rubyforge.org/">ruby bindings</a></li>
<li><a class="reference external" href="python_binding.html">python bindings</a></li>
</ul>
<hr class="docutils" />
<ul class="simple">
<li><a class="reference" href="bittorrent.pdf">Introduction, slides</a></li>
<li><a class="reference external" href="bittorrent.pdf">Introduction, slides</a></li>
</ul>
</div>
<div id="libraryBody"><div class="section">
<h1><a id="libtorrent" name="libtorrent">libtorrent</a></h1>
<div id="libraryBody"><div class="section" id="libtorrent">
<h1>libtorrent</h1>
<p>libtorrent is a C++ library that aims to be a good alternative to all the
other bittorrent implementations around. It is a
library and not a full featured client, although it comes with a working
<a class="reference" href="client_test.html">example client</a>.</p>
<a class="reference external" href="client_test.html">example client</a>.</p>
<p>The main goals of libtorrent are:</p>
<ul class="simple">
<li>to be cpu efficient</li>
<li>to be memory efficient</li>
<li>to be very easy to use</li>
</ul>
<div class="section">
<h2><a id="donate" name="donate">Donate</a></h2>
<div class="section" id="donate">
<h2>Donate</h2>
<p>Support the development of libtorrent</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick">
@ -70,18 +71,18 @@ library and not a full featured client, although it comes with a working
<input type="image" src="https://www.paypal.com/images/x-click-but04.gif"
border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form></div>
<div class="section">
<h2><a id="feedback" name="feedback">Feedback</a></h2>
<p>There's a <a class="reference" href="http://lists.sourceforge.net/lists/listinfo/libtorrent-discuss">mailing list</a>, general libtorrent discussion.</p>
<div class="section" id="feedback">
<h2>Feedback</h2>
<p>There's a <a class="reference external" href="http://lists.sourceforge.net/lists/listinfo/libtorrent-discuss">mailing list</a>, general libtorrent discussion.</p>
<p>You can usually find me as hydri in <tt class="docutils literal"><span class="pre">#libtorrent</span></tt> on <tt class="docutils literal"><span class="pre">irc.freenode.net</span></tt>.</p>
</div>
<div class="section">
<h2><a id="acknowledgements" name="acknowledgements">Acknowledgements</a></h2>
<div class="section" id="acknowledgements">
<h2>Acknowledgements</h2>
<p>Written by Arvid Norberg. Copyright (c) 2003-2006</p>
<p>Contributions by Magnus Jonsson, Daniel Wallin and Cory Nelson</p>
<p>Thanks to Reimond Retz for bugfixes, suggestions and testing</p>
<p>Project is hosted by sourceforge.</p>
<p><a class="reference" href="http://sourceforge.net"><img alt="sf_logo" src="http://sourceforge.net/sflogo.php?group_id=7994" /></a></p>
<p><a class="reference external" href="http://sourceforge.net"><img alt="sf_logo" src="http://sourceforge.net/sflogo.php?group_id=7994" /></a></p>
</div></div>
</div>
</div>

View File

@ -7,6 +7,7 @@
* `building libtorrent`_
* examples_
* `api documentation`_
* `running tests`_
* screenshot_
* `mailing list`_ (archive_)
* `who's using libtorrent?`_
@ -50,6 +51,7 @@ libtorrent
.. _`building libtorrent`: building.html
.. _examples: examples.html
.. _`api documentation`: manual.html
.. _`running tests`: running_tests.html
.. _screenshot: client_test.png
.. _`extensions protocol`: extension_protocol.html
.. _`plugin interface`: libtorrent_plugins.html

83
docs/running_tests.html Normal file
View File

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
<title>libtorrent manual</title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div class="document" id="libtorrent-manual">
<h1 class="title">libtorrent manual</h1>
<table class="docinfo" frame="void" rules="none">
<col class="docinfo-name" />
<col class="docinfo-content" />
<tbody valign="top">
<tr><th class="docinfo-name">Author:</th>
<td>Arvid Norberg, <a class="last reference external" href="mailto:arvid&#64;rasterbar.com">arvid&#64;rasterbar.com</a></td></tr>
</tbody>
</table>
<div class="contents topic" id="table-of-contents">
<p class="topic-title first">Table of contents</p>
<ul class="simple">
<li><a class="reference internal" href="#running-and-building-tests" id="id3">running and building tests</a></li>
<li><a class="reference internal" href="#id1" id="id4">lighty</a></li>
<li><a class="reference internal" href="#delegate" id="id5">delegate</a></li>
<li><a class="reference internal" href="#openssl" id="id6">OpenSSL</a></li>
</ul>
</div>
<div class="section" id="running-and-building-tests">
<h1>running and building tests</h1>
<p>Some of the tests of libtorrent are not self contained. For instance, in
order to test the <tt class="docutils literal"><span class="pre">http_connection</span></tt> class in libtorrent, the test requires
<a class="reference external" href="http://www.lighttpd.net">lighty</a>. This document outlines the requirements of the tests as well as
describes how to set up your environment to be able to run them.</p>
</div>
<div class="section" id="id1">
<h1>lighty</h1>
<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
with SSL support (which it is by default), lighty needs SSL support as well.</p>
<p>To build lighty with SSL support do:</p>
<pre class="literal-block">
./configure --with-openssl
</pre>
<p>Followed by:</p>
<pre class="literal-block">
sudo make install
</pre>
<p>Make sure you have SSL support in lighty by running:</p>
<pre class="literal-block">
lighttpd -V
</pre>
<p>Which gives you a list of all enabled features.</p>
</div>
<div class="section" id="delegate">
<h1>delegate</h1>
<p><a class="reference external" href="http://www.delegate.org">Delegate</a> can act as many different proxies, which makes it a convenient
tool to use to test libtorrent's support for SOCKS4, SOCKS5, HTTPS and
HTTP proxies.</p>
<p>You can download prebuilt binaries for the most common platforms on
<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>
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
instance <tt class="docutils literal"><span class="pre">/bin</span></tt>.</p>
</div>
<div class="section" id="openssl">
<h1>OpenSSL</h1>
<p>In order to create an SSL certificate for <a class="reference external" href="http://www.lighttpd.net">lighty</a>, openssl is used. More
specifically, the following command is issued by the test to create the
certificate file:</p>
<pre class="literal-block">
echo -e &quot;AU\ntest province\ntest city\ntest company\ntest department\n\
tester\ntest&#64;test.com&quot; | openssl req -new -x509 -keyout server.pem \
-out server.pem -days 365 -nodes
</pre>
<p>This will write <tt class="docutils literal"><span class="pre">server.pem</span></tt> which is referenced in the lighty
confiuration file.</p>
<p>OpenSSL comes installed with most Linux and BSD distros, including Mac OS X.
You can download it from <a class="reference external" href="http://www.openssl.org/">the openssl homepage</a>.</p>
</div>
</div>
</body>
</html>

75
docs/running_tests.rst Normal file
View File

@ -0,0 +1,75 @@
=================
libtorrent manual
=================
:Author: Arvid Norberg, arvid@rasterbar.com
.. contents:: Table of contents
:depth: 2
:backlinks: none
running and building tests
==========================
Some of the tests of libtorrent are not self contained. For instance, in
order to test the ``http_connection`` class in libtorrent, the test requires
lighty_. This document outlines the requirements of the tests as well as
describes how to set up your environment to be able to run them.
.. _lighty: http://www.lighttpd.net
lighty
======
Download lighty_. I've tested with ``lighttpd-1.4.19``. If libtorrent is built
with SSL support (which it is by default), lighty needs SSL support as well.
To build lighty with SSL support do::
./configure --with-openssl
Followed by::
sudo make install
Make sure you have SSL support in lighty by running::
lighttpd -V
Which gives you a list of all enabled features.
delegate
========
Delegate_ can act as many different proxies, which makes it a convenient
tool to use to test libtorrent's support for SOCKS4, SOCKS5, HTTPS and
HTTP proxies.
.. _Delegate: http://www.delegate.org
You can download prebuilt binaries for the most common platforms on
`deletate's download page`_. Make sure to name the executable ``delegated``
and put it in a place where a shell can pick it up, in its ``PATH``. For
instance ``/bin``.
.. _`deletate's download page`: http://www.delegate.org/delegate/download/
OpenSSL
=======
In order to create an SSL certificate for lighty_, openssl is used. More
specifically, the following command is issued by the test to create the
certificate file::
echo -e "AU\ntest province\ntest city\ntest company\ntest department\n\
tester\ntest@test.com" | openssl req -new -x509 -keyout server.pem \
-out server.pem -days 365 -nodes
This will write ``server.pem`` which is referenced in the lighty
confiuration file.
OpenSSL comes installed with most Linux and BSD distros, including Mac OS X.
You can download it from `the openssl homepage`_.
.. _`the openssl homepage`: http://www.openssl.org/