Alexandre Julliard : winetest: For tests run on Wine, enforce that the Wine version is not older than the test build.
Alexandre Julliard
julliard at winehq.org
Thu Sep 11 16:27:40 CDT 2008
Module: tools
Branch: master
Commit: debcd82f5f6947d518ef26b40da508de87e544e8
URL: http://source.winehq.org/git/tools.git/?a=commit;h=debcd82f5f6947d518ef26b40da508de87e544e8
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Sep 11 20:36:38 2008 +0200
winetest: For tests run on Wine, enforce that the Wine version is not older than the test build.
---
winetest/dissect | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/winetest/dissect b/winetest/dissect
index d3782cb..17a5c4b 100755
--- a/winetest/dissect
+++ b/winetest/dissect
@@ -124,7 +124,7 @@ while (($_ = <IN>) =~ s/^ //)
}
$box->{data} .= "</div>";
-my ($wine, $version, $major, $minor, $plid, $product);
+my ($wine, $wine_build, $version, $major, $minor, $plid, $product);
/^Operating system version:\r?$/ or mydie "no OS header: $_";
$box = create_box( "version", "version", "Operating system version" );
$box->{data} .= "<table class=\"output\">\n";
@@ -140,6 +140,8 @@ while (($_ = <IN>) =~ /^\s*([0-9a-zA-Z ]+)=(.*?)\r?$/) {
$plid = $2;
} elsif ($1 eq "wProductType") {
$product = $2;
+ } elsif ($1 eq "WineBuild") {
+ $wine_build = $2;
}
}
$box->{data} .= "</table>";
@@ -180,6 +182,26 @@ if ($wine) {
$tag = "_$version$tag";
$version = "wine";
}
+if ($wine_build) {
+ my $wine_commit;
+ if ($wine_build =~ /-g([0-9a-f]+)$/)
+ {
+ $wine_commit = `git rev-parse --verify $1^0 2>/dev/null`;
+ }
+ elsif ($wine_build =~ /^[-+._0-9A-Za-z]+$/)
+ {
+ $wine_commit = `git rev-parse --verify $wine_build^0 2>/dev/null`;
+ }
+ else
+ {
+ mydie "invalid wine build '$wine_build'\n";
+ }
+ chomp $wine_commit;
+ mydie "unknown wine build '$wine_build'\n" unless $wine_commit;
+ my $merge_base = `git merge-base $wine_commit $testbuild 2>/dev/null`;
+ chomp $merge_base;
+ $merge_base eq $testbuild or mydie "wine build '$wine_build' not a descendant of build $testbuild\n";
+}
my %dllinfo;
/^Dll info:\r?$/ or mydie "no Dll info header: $_";
More information about the wine-cvs
mailing list