File: [local] / www / Attic / porttest.html (download) (as text)
Revision 1.7, Wed Sep 11 09:31:13 2002 UTC (21 years, 8 months ago) by couderc
Branch: MAIN
Changes since 1.6: +45 -37 lines
wording from Margarida Sequeira
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>OpenBSD Port Testing Guide</title>
</head>
<body text="#000000" bgcolor="#FFFFFF" link="#23238E">
<a href="index.html"><img alt="[OpenBSD]" height="30" width="141" src=
"images/smalltitle.gif" border="0"></a>
<h2><font color="#e00000">Port Testing Guide</font></h2>
<hr>
<h2><font color="#0000e0">Index</font></h2>
<ul>
<li><a href="#Introduction">Introduction</a></li>
<li><a href="#How">How</a></li>
<li><a href="#First">First step</a></li>
<li><a href="#Testing">Testing</a></li>
<li><a href="#Commenting">Commenting</a></li>
<li><a href="#More">More testing</a></li>
</ul>
<hr>
<h2><a name="Introduction"><font color=
"#0000e0">Introduction</font></a></h2>
<p>The <a href="ports.html">ports tree</a> is an huge piece of work that
permits OpenBSD users to use third-party programs without losing time in
patching, configuring, etc. This work is done by a few volunteers who
spend hours making your favorite applications work fine on your
system. Many people think that they can't help our project because they
don't have enough knowledge; this is false because they can help porters
work better and faster.</p>
<h2><a name="How"><font color="#0000e0">How</font></a></h2>
<p>Simply by testing submitted updates or new ports which are posted on
<a href="mail.html">ports mailing list</a>. By doing this
you reduce the latency of commits and also increase the number of ports to
be committed (many ports are not committed because of lack of testing!).</p>
<h2><a name="First"><font color="#0000e0">First step</font></a></h2>
<p>Before starting the tester must have in mind that ports development is
done with <a href="plus.html">OpenBSD-current</a> as target.This means
that there is no guarantee that new ports will work correctly on the other
branches. This also means that the tester should upgrade his system to
-current as well as the ports tree (instructions on how to do this can be
found at the <a href="../anoncvs.html">anoncvs</a> page and in the
proper <a href="./upgrade-minifaq.html">faq section</a>.
Having this done, the system is now prepared to do port testing. It is also
advisable the subscription of ports and ports-changes
<a href="../mail.html">mailing-lists</a>, this way the tester will be notified
about new/updated ports (to be tested) and about changes in the ports
tree.</p>
<h2><a name="Testing"><font color="#0000e0">Testing</font></a></h2>
<p>In the mailing-lists two types of submission can be found; new ports
and updates. New ports are generally posted as tarball attachment
(or an url is given) which contains the port tree. A good idea is to extract
it into the <tt>/usr/ports/mystuff/</tt> directory and test the port from here.
Updates are generally a diff against current ports tree, so it is suggested
to copy the port in <tt>mystuff/</tt> and apply the diff to prevent tree
breakage.</p>
<p>Step-by-step building is needed to verify that every target, see
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ports&sektion=7&">
ports(7)</a>, is achieved correctly :</p>
<ul>
<li>fetch : Needed to verify that distfile(s) are correctly downloaded.</li>
<li>extract : Generally extract is done without a problem, this target can
be ignored in most cases.</li>
<li>patch : Check if patches are applied correctly and track down
forgotten <tt>.orig</tt> files.</li>
<li>configure : For ports which use a configure script the tester can
verify if it has the correct path for dependencies, use(less) features,
etc ...</li>
<li>build : The build itself should not give errors but could contain
minor warnings about <a href=
"http://www.openbsd.org/cgi-bin/man.cgi?query=tmpnam&sektion=3&">
tmpnam(3)</a> issues to be resolved by using
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=mkstemp&sektion=3&">
mkstemp(3)</a>.</li>
<li>fake : This target fakes installation of the package and prepares
its installation. Checking can be done by verifying that files are
properly installed in the fake directory.</li>
<li>package : Package creation can break if pkg/PLIST* and/or
pkg/PFRAG* are wrong.</li>
<li>install : Check that package installation works fine.</li>
<li>deinstall : Don't forget to test deinstall.</li>
</ul>
<p>Checking of pkg/ files like DESCR, MESSAGE, INSTALL,
DEINSTALL is also to be done</p>
<h2><a name="Commenting"><font color="#0000e0">Commenting</font></a></h2>
<p>At the end of the test comes the really important thing : comments.
Even if the port is working fine comments must be done. If we have ten
posts where people say that the port runs fine under different architectures
then the commit is done faster. If it does not work then some information
must be given.
There are tools that can help in this task, like <a href=
"http://www.openbsd.org/cgi-bin/cvsweb/ports/infrastructure/build/portslogger">
portslogger</a>.</p>
<p>Example :<br>
</p>
<div style="margin-left: 2em">
<table border="0" cellpadding="3" width="100%">
<tr>
<td nowrap bgcolor="#EEEEEE">
<pre>
# make install | /usr/ports/infrastructure/build/portslogger .
</pre>
</td>
</tr>
</table>
</div>
<br>
<br>
<p>This will redirect the output into a log file located in the current
directory.</p>
<h2><a name="More"><font color="#0000e0">More testing</font></a></h2>
<p>Check the port Makefile for typos, incorrect links, useless or
missing variables, correct licensing and correct category.
For those who are more skilled other targets can be tested like
lib-depends-check. Patches and pkg directories deep verification
as well as providing diffs to correct bugs, add flavors, or other
enhancements.</p>
<hr>
<address>
<p>$OpenBSD: porttest.html,v 1.7 2002/09/11 09:31:13 couderc Exp $<br>
OpenBSD Copyright © 2002 OpenBSD</p>
</address>
</body>
</html>