2000-12-13 22:52:37 +01:00
|
|
|
<chapter id="cvs-regression">
|
2003-02-17 02:49:13 +01:00
|
|
|
<title>How to do regression testing using CVS</title>
|
2000-12-13 22:52:37 +01:00
|
|
|
|
|
|
|
<para>
|
2001-10-16 23:47:51 +02:00
|
|
|
written by Gerard Patel
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
(Extracted from <filename>wine/documentation/bugreports</filename>)
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
A problem that can happen sometimes is 'it used to work
|
|
|
|
before, now it doesn't anymore...'. Here is a step by step
|
|
|
|
procedure to try to pinpoint when the problem occured. This is
|
|
|
|
<emphasis>NOT</emphasis> for casual users.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<orderedlist>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2003-02-17 02:49:13 +01:00
|
|
|
Get the <quote>full CVS</quote> archive from winehq. This archive is
|
|
|
|
the CVS tree but with the tags controlling the versioning
|
2001-10-16 23:47:51 +02:00
|
|
|
system. It's a big file (> 40 meg) with a name like
|
|
|
|
wine-cvsdirs-<last update date> (it's more than 100mb
|
2000-12-13 22:52:37 +01:00
|
|
|
when uncompressed, you can't very well do this with
|
|
|
|
small, old computers or slow Internet connections).
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
untar it into a repository directory:
|
|
|
|
<screen>
|
2003-02-17 02:49:13 +01:00
|
|
|
cd /home/gerard
|
|
|
|
tar -zxf cvs-dirs-2003-01-15.tar.gz
|
|
|
|
mv wine repository
|
2000-12-13 22:52:37 +01:00
|
|
|
</screen>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
extract a new destination directory. This directory must
|
|
|
|
not be in a subdirectory of the repository else
|
|
|
|
<command>cvs</command> will think it's part of the
|
|
|
|
repository and deny you an extraction in the repository:
|
|
|
|
<screen>
|
2003-02-17 02:49:13 +01:00
|
|
|
cd /home/gerard
|
|
|
|
mv wine wine_current (-> this protects your current wine sandbox, if any)
|
|
|
|
export CVSROOT=/home/gerard/repository
|
|
|
|
cd /home/gerard
|
|
|
|
cvs -d $CVSROOT checkout wine
|
2000-12-13 22:52:37 +01:00
|
|
|
</screen>
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Note that it's not possible to do a checkout at a given
|
|
|
|
date; you always do the checkout for the last date where
|
2001-10-16 23:47:51 +02:00
|
|
|
the wine-cvsdirs-xxx snapshot was generated.
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
2001-10-16 23:47:51 +02:00
|
|
|
<para>
|
|
|
|
Note also that it is possible to do all this with a direct
|
2003-02-17 02:49:13 +01:00
|
|
|
CVS connection, of course. The full CVS file method is less
|
2003-04-01 05:26:13 +02:00
|
|
|
painful for the Winehq CVS server and probably a bit faster
|
2001-10-16 23:47:51 +02:00
|
|
|
if you don't have a very good net connection.
|
|
|
|
</para>
|
|
|
|
<note>
|
|
|
|
<para>
|
2003-02-17 02:49:13 +01:00
|
|
|
If you use CVS directly from the winehq.com server, do not
|
2001-10-16 23:47:51 +02:00
|
|
|
forget to add to your <filename>.cvsrc</filename> file:
|
|
|
|
</para>
|
|
|
|
<screen>
|
2003-02-17 02:49:13 +01:00
|
|
|
cvs -z 3
|
|
|
|
update -dPA
|
|
|
|
diff -u
|
2001-10-16 23:47:51 +02:00
|
|
|
</screen>
|
|
|
|
</note>
|
2000-12-13 22:52:37 +01:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
you will have now in the <filename>~/wine</filename>
|
2003-02-17 02:49:13 +01:00
|
|
|
directory an image of the CVS tree, on the client side.
|
2000-12-13 22:52:37 +01:00
|
|
|
Now update this image to the date you want:
|
|
|
|
<screen>
|
2003-02-17 02:49:13 +01:00
|
|
|
cd /home/gerard/wine
|
|
|
|
cvs -d $CVSROOT update -D "2002-06-01 CST"
|
2000-12-13 22:52:37 +01:00
|
|
|
</screen>
|
|
|
|
</para>
|
|
|
|
<para>
|
2001-10-16 23:47:51 +02:00
|
|
|
The date format is <literal>YYYY-MM-DD HH:MM:SS</literal>.
|
2003-02-17 02:49:13 +01:00
|
|
|
Using the CST date format ensure that you will be able to
|
2001-10-16 23:47:51 +02:00
|
|
|
extract patches in a way that will be compatible with the
|
2003-02-17 02:49:13 +01:00
|
|
|
wine-cvs archive
|
|
|
|
<ulink url="http://www.winehq.com/hypermail/wine-cvs">
|
|
|
|
http://www.winehq.com/hypermail/wine-cvs</ulink>
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Many messages will inform you that more recent files have
|
|
|
|
been deleted to set back the client cvs tree to the date
|
|
|
|
you asked, for example:
|
|
|
|
<screen>
|
2003-02-17 02:49:13 +01:00
|
|
|
cvs update: tsx11/ts_xf86dga2.c is no longer in the repository
|
2000-12-13 22:52:37 +01:00
|
|
|
</screen>
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
<command>cvs update</command> is not limited to upgrade to
|
2003-02-17 02:49:13 +01:00
|
|
|
a <emphasis>newer</emphasis> version as I have believed for
|
|
|
|
far too long :-(
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Now proceed as for a normal update:
|
|
|
|
</para>
|
|
|
|
<screen>
|
2003-02-17 02:49:13 +01:00
|
|
|
./configure
|
|
|
|
make depend && make
|
2000-12-13 22:52:37 +01:00
|
|
|
</screen>
|
|
|
|
<para>
|
|
|
|
If any non-programmer reads this, the fastest method to get
|
|
|
|
at the point where the problem occured is to use a binary
|
|
|
|
search, that is, if the problem occured in 1999, start at
|
|
|
|
mid-year, then is the problem is already here, back to 1st
|
|
|
|
April, if not, to 1st October, and so on.
|
|
|
|
</para>
|
|
|
|
<para>
|
2003-02-17 02:49:13 +01:00
|
|
|
If you have lot of hard disk free space (a full compile currently
|
|
|
|
takes 400 Mb), copy the oldest known working version before
|
|
|
|
updating it, it will save time if you need to go back. (it's
|
|
|
|
better to <command>make distclean</command> before going back in
|
|
|
|
time, so you have to make everything if you don't backup the older
|
|
|
|
version)
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
2001-10-16 23:47:51 +02:00
|
|
|
<para>
|
|
|
|
When you have found the day where the problem happened, continue
|
|
|
|
the search using the wine-cvs archive (sorted by date) and a
|
|
|
|
more precise cvs update including hour, minute, second :
|
|
|
|
<screen>
|
2003-02-17 02:49:13 +01:00
|
|
|
cvs -d $CVSROOT update -D "2002-06-01 15:17:25 CST"
|
2001-10-16 23:47:51 +02:00
|
|
|
</screen>
|
|
|
|
This will allow you to find easily the exact patch that did it.
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
2001-10-16 23:47:51 +02:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2000-12-13 22:52:37 +01:00
|
|
|
<para>
|
2001-10-16 23:47:51 +02:00
|
|
|
If you find the patch that is the cause of the problem, you have
|
2003-02-17 02:49:13 +01:00
|
|
|
almost won; report about it to
|
|
|
|
<ulink url="http://bugs.winehq.com/">Wine Bugzilla</ulink>
|
|
|
|
or susbscribe to wine-devel and post it there. There is a chance
|
|
|
|
that the author
|
2001-10-16 23:47:51 +02:00
|
|
|
will jump in to suggest a fix; or there is always the possibility
|
|
|
|
to look hard at the patch until it is coerced to reveal where is
|
|
|
|
the bug :-)
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</orderedlist>
|
|
|
|
</chapter>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
2003-04-19 04:50:57 +02:00
|
|
|
sgml-parent-document:("wine-devel.sgml" "set" "book" "part" "chapter" "")
|
2000-12-13 22:52:37 +01:00
|
|
|
End:
|
|
|
|
-->
|