John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 1 | <chapter id="cvs-regression"> |
Tony Lambregts | 027cef8 | 2003-02-17 01:49:13 +0000 | [diff] [blame] | 2 | <title>How to do regression testing using CVS</title> |
John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 3 | |
| 4 | <para> |
John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 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 |
Tom Wickline | c28575e | 2003-07-09 19:50:14 +0000 | [diff] [blame] | 7 | procedure to try to pinpoint when the problem occurred. This is |
John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 8 | <emphasis>NOT</emphasis> for casual users. |
| 9 | </para> |
| 10 | |
| 11 | <orderedlist> |
| 12 | <listitem> |
| 13 | <para> |
Tony Lambregts | 027cef8 | 2003-02-17 01:49:13 +0000 | [diff] [blame] | 14 | Get the <quote>full CVS</quote> archive from winehq. This archive is |
| 15 | the CVS tree but with the tags controlling the versioning |
Gerard Patel | 2895e7f | 2001-10-16 21:47:51 +0000 | [diff] [blame] | 16 | system. It's a big file (> 40 meg) with a name like |
Richard Cohen | e040b7c | 2003-09-25 20:24:16 +0000 | [diff] [blame] | 17 | full-cvs-<last update date> (it's more than 100mb |
John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 18 | when uncompressed, you can't very well do this with |
| 19 | small, old computers or slow Internet connections). |
| 20 | </para> |
| 21 | </listitem> |
| 22 | <listitem> |
| 23 | <para> |
| 24 | untar it into a repository directory: |
| 25 | <screen> |
Tony Lambregts | 027cef8 | 2003-02-17 01:49:13 +0000 | [diff] [blame] | 26 | cd /home/gerard |
Richard Cohen | e040b7c | 2003-09-25 20:24:16 +0000 | [diff] [blame] | 27 | tar -zxf full-cvs-2003-08-18.tar.gz |
Tony Lambregts | 027cef8 | 2003-02-17 01:49:13 +0000 | [diff] [blame] | 28 | mv wine repository |
John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 29 | </screen> |
| 30 | </para> |
| 31 | </listitem> |
| 32 | <listitem> |
| 33 | <para> |
| 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: |
| 38 | <screen> |
Tony Lambregts | 027cef8 | 2003-02-17 01:49:13 +0000 | [diff] [blame] | 39 | cd /home/gerard |
| 40 | mv wine wine_current (-> this protects your current wine sandbox, if any) |
| 41 | export CVSROOT=/home/gerard/repository |
Tony Lambregts | 027cef8 | 2003-02-17 01:49:13 +0000 | [diff] [blame] | 42 | cvs -d $CVSROOT checkout wine |
John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 43 | </screen> |
| 44 | </para> |
| 45 | <para> |
| 46 | Note that it's not possible to do a checkout at a given |
| 47 | date; you always do the checkout for the last date where |
Richard Cohen | e040b7c | 2003-09-25 20:24:16 +0000 | [diff] [blame] | 48 | the full-cvs-xxx snapshot was generated. |
John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 49 | </para> |
Gerard Patel | 2895e7f | 2001-10-16 21:47:51 +0000 | [diff] [blame] | 50 | <para> |
| 51 | Note also that it is possible to do all this with a direct |
Tony Lambregts | 027cef8 | 2003-02-17 01:49:13 +0000 | [diff] [blame] | 52 | CVS connection, of course. The full CVS file method is less |
Francois Gouget | 224063f | 2003-09-29 20:20:53 +0000 | [diff] [blame] | 53 | painful for the WineHQ CVS server and probably a bit faster |
Gerard Patel | 2895e7f | 2001-10-16 21:47:51 +0000 | [diff] [blame] | 54 | if you don't have a very good net connection. |
| 55 | </para> |
| 56 | <note> |
| 57 | <para> |
Dimitrie O. Paun | c023254 | 2003-11-26 03:55:01 +0000 | [diff] [blame] | 58 | If you use CVS directly from the winehq.org server, do not |
Gerard Patel | 2895e7f | 2001-10-16 21:47:51 +0000 | [diff] [blame] | 59 | forget to add to your <filename>.cvsrc</filename> file: |
| 60 | </para> |
| 61 | <screen> |
Tony Lambregts | 027cef8 | 2003-02-17 01:49:13 +0000 | [diff] [blame] | 62 | cvs -z 3 |
| 63 | update -dPA |
| 64 | diff -u |
Gerard Patel | 2895e7f | 2001-10-16 21:47:51 +0000 | [diff] [blame] | 65 | </screen> |
| 66 | </note> |
John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 67 | </listitem> |
| 68 | <listitem> |
| 69 | <para> |
| 70 | you will have now in the <filename>~/wine</filename> |
Tony Lambregts | 027cef8 | 2003-02-17 01:49:13 +0000 | [diff] [blame] | 71 | directory an image of the CVS tree, on the client side. |
John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 72 | Now update this image to the date you want: |
| 73 | <screen> |
Tony Lambregts | 027cef8 | 2003-02-17 01:49:13 +0000 | [diff] [blame] | 74 | cd /home/gerard/wine |
| 75 | cvs -d $CVSROOT update -D "2002-06-01 CST" |
John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 76 | </screen> |
| 77 | </para> |
| 78 | <para> |
Gerard Patel | 2895e7f | 2001-10-16 21:47:51 +0000 | [diff] [blame] | 79 | The date format is <literal>YYYY-MM-DD HH:MM:SS</literal>. |
Tony Lambregts | 027cef8 | 2003-02-17 01:49:13 +0000 | [diff] [blame] | 80 | Using the CST date format ensure that you will be able to |
Gerard Patel | 2895e7f | 2001-10-16 21:47:51 +0000 | [diff] [blame] | 81 | extract patches in a way that will be compatible with the |
Tony Lambregts | 027cef8 | 2003-02-17 01:49:13 +0000 | [diff] [blame] | 82 | wine-cvs archive |
Dimitrie O. Paun | c023254 | 2003-11-26 03:55:01 +0000 | [diff] [blame] | 83 | <ulink url="http://www.winehq.org/hypermail/wine-cvs"> |
| 84 | http://www.winehq.org/hypermail/wine-cvs</ulink> |
John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 85 | </para> |
| 86 | <para> |
| 87 | Many messages will inform you that more recent files have |
| 88 | been deleted to set back the client cvs tree to the date |
| 89 | you asked, for example: |
| 90 | <screen> |
Tony Lambregts | 027cef8 | 2003-02-17 01:49:13 +0000 | [diff] [blame] | 91 | cvs update: tsx11/ts_xf86dga2.c is no longer in the repository |
John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 92 | </screen> |
| 93 | </para> |
| 94 | <para> |
| 95 | <command>cvs update</command> is not limited to upgrade to |
Tony Lambregts | 027cef8 | 2003-02-17 01:49:13 +0000 | [diff] [blame] | 96 | a <emphasis>newer</emphasis> version as I have believed for |
| 97 | far too long :-( |
John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 98 | </para> |
| 99 | </listitem> |
| 100 | <listitem> |
| 101 | <para> |
| 102 | Now proceed as for a normal update: |
| 103 | </para> |
| 104 | <screen> |
Tony Lambregts | 027cef8 | 2003-02-17 01:49:13 +0000 | [diff] [blame] | 105 | ./configure |
| 106 | make depend && make |
John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 107 | </screen> |
| 108 | <para> |
John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 109 | If any non-programmer reads this, the fastest method to get |
Tom Wickline | c28575e | 2003-07-09 19:50:14 +0000 | [diff] [blame] | 110 | at the point where the problem occurred is to use a binary |
| 111 | search, that is, if the problem occurred in 1999, start at |
John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 112 | mid-year, then is the problem is already here, back to 1st |
| 113 | April, if not, to 1st October, and so on. |
| 114 | </para> |
Gerard Patel | 2895e7f | 2001-10-16 21:47:51 +0000 | [diff] [blame] | 115 | <para> |
Tony Lambregts | 027cef8 | 2003-02-17 01:49:13 +0000 | [diff] [blame] | 116 | If you have lot of hard disk free space (a full compile currently |
| 117 | takes 400 Mb), copy the oldest known working version before |
| 118 | updating it, it will save time if you need to go back. (it's |
| 119 | better to <command>make distclean</command> before going back in |
| 120 | time, so you have to make everything if you don't backup the older |
| 121 | version) |
Gerard Patel | 2895e7f | 2001-10-16 21:47:51 +0000 | [diff] [blame] | 122 | </para> |
Vincent BĂ©ron | b940e37 | 2003-07-21 22:42:50 +0000 | [diff] [blame] | 123 | <para> |
Gerard Patel | 2895e7f | 2001-10-16 21:47:51 +0000 | [diff] [blame] | 124 | When you have found the day where the problem happened, continue |
| 125 | the search using the wine-cvs archive (sorted by date) and a |
| 126 | more precise cvs update including hour, minute, second : |
| 127 | <screen> |
Tony Lambregts | 027cef8 | 2003-02-17 01:49:13 +0000 | [diff] [blame] | 128 | cvs -d $CVSROOT update -D "2002-06-01 15:17:25 CST" |
Gerard Patel | 2895e7f | 2001-10-16 21:47:51 +0000 | [diff] [blame] | 129 | </screen> |
| 130 | This will allow you to find easily the exact patch that did it. |
| 131 | </para> |
John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 132 | </listitem> |
| 133 | <listitem> |
| 134 | <para> |
Gerard Patel | 2895e7f | 2001-10-16 21:47:51 +0000 | [diff] [blame] | 135 | If you find the patch that is the cause of the problem, you have |
Tony Lambregts | 027cef8 | 2003-02-17 01:49:13 +0000 | [diff] [blame] | 136 | almost won; report about it to |
Dimitrie O. Paun | c023254 | 2003-11-26 03:55:01 +0000 | [diff] [blame] | 137 | <ulink url="http://bugs.winehq.org/">Wine Bugzilla</ulink> |
Tom Wickline | c28575e | 2003-07-09 19:50:14 +0000 | [diff] [blame] | 138 | or subscribe to wine-devel and post it there. There is a chance |
Tony Lambregts | 027cef8 | 2003-02-17 01:49:13 +0000 | [diff] [blame] | 139 | that the author |
Gerard Patel | 2895e7f | 2001-10-16 21:47:51 +0000 | [diff] [blame] | 140 | will jump in to suggest a fix; or there is always the possibility |
| 141 | to look hard at the patch until it is coerced to reveal where is |
| 142 | the bug :-) |
John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 143 | </para> |
| 144 | </listitem> |
| 145 | </orderedlist> |
| 146 | </chapter> |
| 147 | |
| 148 | <!-- Keep this comment at the end of the file |
| 149 | Local variables: |
| 150 | mode: sgml |
Dimitrie O. Paun | 255ecc5 | 2003-04-19 02:50:57 +0000 | [diff] [blame] | 151 | sgml-parent-document:("wine-devel.sgml" "set" "book" "part" "chapter" "") |
John R. Sheets | d9e064f | 2000-12-13 21:52:37 +0000 | [diff] [blame] | 152 | End: |
| 153 | --> |