<!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's 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's 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="mailto:ports@openbsd.org">ports@openbsd.org</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 you must know that ports development is done by
following <a href="plus.html">OpenBSD-current</a>; you can find
instructions on following current <a href="anoncvs.html">source</a> and
<a href="faq/upgrade-minifaq.html">upgrade faq</a>. When it's done you
are ready to follow <a href=
"mailto:ports@openbsd.org">ports@openbsd.org</a> .</p>
<h2><a name="Testing"><font color="#0000e0">Testing</font></a></h2>
<p>Now that you are on the mailing-list you can find two types of
submissions; new ports and updates. New ports are generally posted as
an attachment or url to a tarball which contains the port tree. A good
idea is to extract it into the <tt>/usr/ports/mystuff/</tt> directory
and then test it. Updates are generally a diff against the current
ports tree, so it is suggested that you copy the port into <tt>mystuff/</tt>
and apply the diff to prevent breaking your tree.</p>
<p>You will need to perform step-by-step the building of the port to
verify that every <a href=
"http://www.openbsd.org/cgi-bin/man.cgi?query=ports&sektion=7&format=html">target</a> is going correctly :</p>
<ul>
<li>fetch : You just need to verify that distfile(s) are correctly
downloaded.</li>
<li>extract : Generally extract is done without a problem, so you can
ignore this target in most cases.</li>
<li>patch : Check if patches apply correctly and track down forgotten
<tt>.orig</tt> .</li>
<li>configure : For ports which use a configure script you can verify
they have 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=0&format=html">tmpnam</a> issues to be resolved by using <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=mkstemp&sektion=0&format=html">mkstemp</a>.</li>
<li>fake : This target is faking installation of the package to prepare
for packaging. You should verify that files are installed in 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>You could also check some pkg/ stuff like DESCR, MESSAGE, INSTALL,
DEINSTALL</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 you must comment on it. 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 you must give some
information using tools such as <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>For those who are more skilled they can test targets like
lib-depends-check, look at patches and pkg stuff. You can also provide
diffs to correct bugs, add flavors, or other enhancements.</p>
<hr>
<address>
<p>$OpenBSD: porttest.html,v 1.5 2002/09/10 21:27:36 avsm Exp $<br>
OpenBSD Copyright © 2002 OpenBSD</p>
</address>
</body>
</html>