1 <chapter id="cvs-regression">
2 <title>How to do regression testing using CVS</title>
5 A problem that can happen sometimes is 'it used to work
6 before, now it doesn't anymore...'. Here is a step by step
7 procedure to try to pinpoint when the problem occurred. This is
8 <emphasis>NOT</emphasis> for casual users.
14 Get the <quote>full CVS</quote> archive from winehq. This archive is
15 the CVS tree but with the tags controlling the versioning
16 system. It's a big file (> 40 meg) with a name like
17 wine-cvsdirs-<last update date> (it's more than 100mb
18 when uncompressed, you can't very well do this with
19 small, old computers or slow Internet connections).
24 untar it into a repository directory:
27 tar -zxf cvs-dirs-2003-01-15.tar.gz
34 extract a new destination directory. This directory must
35 not be in a subdirectory of the repository else
36 <command>cvs</command> will think it's part of the
37 repository and deny you an extraction in the repository:
40 mv wine wine_current (-> this protects your current wine sandbox, if any)
41 export CVSROOT=/home/gerard/repository
43 cvs -d $CVSROOT checkout wine
47 Note that it's not possible to do a checkout at a given
48 date; you always do the checkout for the last date where
49 the wine-cvsdirs-xxx snapshot was generated.
52 Note also that it is possible to do all this with a direct
53 CVS connection, of course. The full CVS file method is less
54 painful for the Winehq CVS server and probably a bit faster
55 if you don't have a very good net connection.
59 If you use CVS directly from the winehq.com server, do not
60 forget to add to your <filename>.cvsrc</filename> file:
71 you will have now in the <filename>~/wine</filename>
72 directory an image of the CVS tree, on the client side.
73 Now update this image to the date you want:
76 cvs -d $CVSROOT update -D "2002-06-01 CST"
80 The date format is <literal>YYYY-MM-DD HH:MM:SS</literal>.
81 Using the CST date format ensure that you will be able to
82 extract patches in a way that will be compatible with the
84 <ulink url="http://www.winehq.com/hypermail/wine-cvs">
85 http://www.winehq.com/hypermail/wine-cvs</ulink>
88 Many messages will inform you that more recent files have
89 been deleted to set back the client cvs tree to the date
90 you asked, for example:
92 cvs update: tsx11/ts_xf86dga2.c is no longer in the repository
96 <command>cvs update</command> is not limited to upgrade to
97 a <emphasis>newer</emphasis> version as I have believed for
103 Now proceed as for a normal update:
110 If any non-programmer reads this, the fastest method to get
111 at the point where the problem occurred is to use a binary
112 search, that is, if the problem occurred in 1999, start at
113 mid-year, then is the problem is already here, back to 1st
114 April, if not, to 1st October, and so on.
117 If you have lot of hard disk free space (a full compile currently
118 takes 400 Mb), copy the oldest known working version before
119 updating it, it will save time if you need to go back. (it's
120 better to <command>make distclean</command> before going back in
121 time, so you have to make everything if you don't backup the older
125 When you have found the day where the problem happened, continue
126 the search using the wine-cvs archive (sorted by date) and a
127 more precise cvs update including hour, minute, second :
129 cvs -d $CVSROOT update -D "2002-06-01 15:17:25 CST"
131 This will allow you to find easily the exact patch that did it.
136 If you find the patch that is the cause of the problem, you have
137 almost won; report about it to
138 <ulink url="http://bugs.winehq.com/">Wine Bugzilla</ulink>
139 or subscribe to wine-devel and post it there. There is a chance
141 will jump in to suggest a fix; or there is always the possibility
142 to look hard at the patch until it is coerced to reveal where is
149 <!-- Keep this comment at the end of the file
152 sgml-parent-document:("wine-devel.sgml" "set" "book" "part" "chapter" "")