[Tools v2] winetest: Get rid of $gitdir.

Francois Gouget fgouget at codeweavers.com
Fri Apr 21 07:56:00 CDT 2017


Instead require wine.git to be in $workdir.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---

This patch has now be untablged from the commit id checking patch.


*** NOTE ***

WineHQ appears to use /home/winehq/opt/source/git/wine.git as the Wine 
checkout directory. After this patch the scripts will use 
$workdir/wine.git so this should most likely symlink to the above 
location.


I've dithered quite a bit on where to place the $gitdir directory.

Since the site only needs read-only access it could be put in 
tools/winetest which neither the scripts nor the web site have write 
access to.

However any non-official site will actually need write access to it from 
the scripts to ensure that wine.git is up to date before processing 
reports. Otherwise the reports risk being rejected due to the not yet 
known commit id. This could still work with a placement in tools/winehq: 
one would just have to symlink that to a writable location but it does 
imply placing it in $workdir may make more sense.

Placing it in $workdir also means all the resources are in the same 
location which is more consistent. So that's what I went with in the 
end.

 winetest/INSTALL.txt   | 13 ++++++++-----
 winetest/build-index   |  4 ++--
 winetest/dissect       |  4 ++--
 winetest/gather        |  4 ++--
 winetest/winetest.conf |  1 -
 5 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/winetest/INSTALL.txt b/winetest/INSTALL.txt
index d13d1cf8..54ef6ce0 100644
--- a/winetest/INSTALL.txt
+++ b/winetest/INSTALL.txt
@@ -24,22 +24,25 @@ non-executable.
 
 Read-only source code account:
 - Create a new user called 'wine' and log in as that user.
-- You will need an up-to-date Wine repository somewhere. Note that this
-  can be a bare repository and that this site only need read-only
-  access to it. For instance:
-    git clone --bare git://source.winehq.org/git/wine.git
 - Clone Wine's tools repository to $HOME/tools (so this document
   should be available as $HOME/tools/winetest/INSTALL.txt).
     git clone git://source.winehq.org/git/tools.git
 - Edit $HOME/tools/winetest/winetest.conf to set:
     $workdir = "/home/winehq/sites/winetest";
-    $gitdir = "/home/wine/wine.git";
 
 Web site account:
 - Create a new user called 'winehq' and log in as that user.
 - Assuming all Wine's websites are placed in $HOME/sites, create the
   $HOME/sites/winetest directory:
     mkdir -p $HOME/sites/winetest
+- You will need an up-to-date Wine repository somewhere. Note that this
+  can be a bare repository and that this site only needs read-only
+  access to it. One option would be to clone it directly into the
+  sites/winetest directory. For instance:
+    cd $HOME/sites/winetest
+    git clone --bare git://source.winehq.org/git/wine.git
+  But you can also simply create a symbolic link to the appropriate
+  location.
 - Then create symbolic links to the web site's scripts:
     cd $HOME/sites/winetest
     ln -s /home/wine/tools/winetest/report.css
diff --git a/winetest/build-index b/winetest/build-index
index d30fbbb3..31d375ba 100755
--- a/winetest/build-index
+++ b/winetest/build-index
@@ -34,11 +34,11 @@ sub BEGIN
     }
     unshift @INC, $1 if ($0 =~ m=^(/.*)/[^/]+$=);
 }
-use vars qw/$workdir $gitdir $gitweb/;
+use vars qw/$workdir $gitweb/;
 require "winetest.conf";
 
 
-$ENV{GIT_DIR} = $gitdir;
+$ENV{GIT_DIR} = "$workdir/wine.git";
 
 sub get_build_info($)
 {
diff --git a/winetest/dissect b/winetest/dissect
index f94c621f..df5a2fb8 100755
--- a/winetest/dissect
+++ b/winetest/dissect
@@ -48,7 +48,7 @@ sub BEGIN
     }
     unshift @INC, $1 if ($0 =~ m=^(/.*)/[^/]+$=);
 }
-use vars qw/$workdir $gitdir $gitweb $maxmult $maxuserskips $maxfailedtests $maxfilesize $acceptprediluvianwin/;
+use vars qw/$workdir $gitweb $maxmult $maxuserskips $maxfailedtests $maxfilesize $acceptprediluvianwin/;
 require "winetest.conf";
 
 my $name0=$0;
@@ -60,7 +60,7 @@ my $minimum_report_version=4;
 my $summary_version=4;
 
 
-$ENV{GIT_DIR} = $gitdir;
+$ENV{GIT_DIR} = "$workdir/wine.git";
 
 sub get_build_info($)
 {
diff --git a/winetest/gather b/winetest/gather
index b11db9e2..8762dd69 100755
--- a/winetest/gather
+++ b/winetest/gather
@@ -45,7 +45,7 @@ sub BEGIN
     }
     unshift @INC, $1 if ($0 =~ m=^(/.*)/[^/]+$=);
 }
-use vars qw/$workdir $gitdir $gitweb/;
+use vars qw/$workdir $gitweb/;
 require "winetest.conf";
 
 my $name0=$0;
@@ -55,7 +55,7 @@ $name0 =~ s+^.*/++;
 my $summary_version=4;
 
 
-$ENV{GIT_DIR} = $gitdir;
+$ENV{GIT_DIR} = "$workdir/wine.git";
 
 sub get_build_info($)
 {
diff --git a/winetest/winetest.conf b/winetest/winetest.conf
index ba155141..c437fc58 100644
--- a/winetest/winetest.conf
+++ b/winetest/winetest.conf
@@ -2,7 +2,6 @@
 
 $workdir = "/home/winehq/opt/winetest";
 
-$gitdir = "/home/winehq/opt/source/git/wine.git";
 $gitweb = "//source.winehq.org/git/wine.git";
 
 # Maximum number of reports for one version and tag
-- 
2.11.0




More information about the wine-patches mailing list