The new naming scheme is 'project-build', thus avoiding name collisions in case we need build trees for other projects besides Wine. The build now matches the name of the corresponding test reports for Windows builds too; that is exe32 and exe64.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/bin/build/Build.pl | 26 +++++++++---------- testbot/bin/build/Reconfig.pl | 42 +++++++++++++++++++++---------- testbot/bin/build/WineReconfig.pl | 16 +++++++++--- testbot/bin/build/WineTest.pl | 2 +- testbot/lib/Build/Utils.pm | 6 ++--- 5 files changed, 58 insertions(+), 34 deletions(-)
diff --git a/testbot/bin/build/Build.pl b/testbot/bin/build/Build.pl index 7f94c8595..7a268db5c 100755 --- a/testbot/bin/build/Build.pl +++ b/testbot/bin/build/Build.pl @@ -58,11 +58,11 @@ sub BuildNative() { InfoMsg "\nRebuilding native tools\n"; my $CPUCount = GetCPUCount(); - system("cd '$DataDir/build-native' && set -x && ". + system("cd '$DataDir/wine-native' && set -x && ". "time make -j$CPUCount __tooldeps__"); if ($? != 0) { - LogMsg "Rebuild of native tools failed\n"; + LogMsg "The Wine native tools build failed\n"; return !1; }
@@ -71,9 +71,9 @@ sub BuildNative()
sub BuildTestExecutables($$$) { - my ($Targets, $Impacts, $Bits) = @_; + my ($Targets, $Impacts, $Build) = @_;
- return 1 if (!$Targets->{"exe$Bits"}); + return 1 if (!$Targets->{$Build});
my (@BuildDirs, @TestExes); foreach my $TestInfo (values %{$Impacts->{Tests}}) @@ -81,26 +81,26 @@ sub BuildTestExecutables($$$) push @BuildDirs, $TestInfo->{Path}; my $TestExe = "$TestInfo->{Path}/$TestInfo->{ExeBase}.exe"; push @TestExes, $TestExe; - unlink("$DataDir/build-mingw$Bits/$TestExe"); # Ignore errors + unlink("$DataDir/wine-$Build/$TestExe"); # Ignore errors }
- InfoMsg "\nBuilding the $Bits-bit test executable(s)\n"; + InfoMsg "\nBuilding the $Build Wine test executable(s)\n"; my $CPUCount = GetCPUCount(); - system("cd '$DataDir/build-mingw$Bits' && set -x && ". + system("cd '$DataDir/wine-$Build' && set -x && ". "time make -j$CPUCount ". join(" ", sort @BuildDirs)); if ($? != 0) { - LogMsg "Rebuild of $Bits-bit crossbuild failed\n"; + LogMsg "The $Build Wine crossbuild failed\n"; return !1; }
my $Success = 1; foreach my $TestExe (@TestExes) { - if (!-f "$DataDir/build-mingw$Bits/$TestExe") + if (!-f "$DataDir/wine-$Build/$TestExe") { - LogMsg "Make didn't produce a $TestExe file\n"; - $Success = undef; + LogMsg "Make didn't produce the $Build $TestExe file\n"; + $Success = !1; } }
@@ -223,8 +223,8 @@ my $Impacts = ApplyPatch("wine", $PatchFile);
if (!$Impacts or ($Impacts->{WineBuild} and !BuildNative()) or - !BuildTestExecutables($Targets, $Impacts, 32) or - !BuildTestExecutables($Targets, $Impacts, 64)) + !BuildTestExecutables($Targets, $Impacts, "exe32") or + !BuildTestExecutables($Targets, $Impacts, "exe64")) { exit(1); } diff --git a/testbot/bin/build/Reconfig.pl b/testbot/bin/build/Reconfig.pl index 36748d66e..f2d63fa24 100755 --- a/testbot/bin/build/Reconfig.pl +++ b/testbot/bin/build/Reconfig.pl @@ -52,19 +52,27 @@ sub BuildNative($) { my ($NoRm) = @_;
- mkdir "$DataDir/build-native" if (! -d "$DataDir/build-native"); + # FIXME Temporary code to ensure compatibility during the transition + my $OldDir = "build-native"; + if (-d "$DataDir/$OldDir" and !-d "$DataDir/wine-native") + { + rename("$DataDir/$OldDir", "$DataDir/wine-native"); + # Add a symlink from compatibility with older server-side TestBot scripts + symlink("wine-native", "$DataDir/$OldDir"); + } + mkdir "$DataDir/wine-native" if (!-d "$DataDir/wine-native");
# Rebuild from scratch to make sure cruft will not accumulate InfoMsg "\nRebuilding native tools\n"; my $CPUCount = GetCPUCount(); - system("cd '$DataDir/build-native' && set -x && ". + system("cd '$DataDir/wine-native' && set -x && ". ($NoRm ? "" : "rm -rf * && ") . "time ../wine/configure --enable-win64 --without-x --without-freetype --disable-winetest && ". "time make -j$CPUCount __tooldeps__");
if ($? != 0) { - LogMsg "Build native failed\n"; + LogMsg "The Wine native tools build failed\n"; return !1; }
@@ -73,22 +81,30 @@ sub BuildNative($)
sub BuildCross($$$) { - my ($Targets, $NoRm, $Bits) = @_; + my ($Targets, $NoRm, $Build) = @_;
- return 1 if (!$Targets->{"exe$Bits"}); - mkdir "$DataDir/build-mingw$Bits" if (!-d "$DataDir/build-mingw$Bits"); + return 1 if (!$Targets->{$Build}); + # FIXME Temporary code to ensure compatibility during the transition + my $OldDir = $Build eq "exe32" ? "build-mingw32" : "build-mingw64"; + if (-d "$DataDir/$OldDir" and !-d "$DataDir/wine-$Build") + { + rename("$DataDir/$OldDir", "$DataDir/wine-$Build"); + # Add a symlink from compatibility with older server-side TestBot scripts + symlink("wine-$Build", "$DataDir/$OldDir"); + } + mkdir "$DataDir/wine-$Build" if (!-d "$DataDir/wine-$Build");
# Rebuild from scratch to make sure cruft will not accumulate - InfoMsg "\nRebuilding the $Bits-bit test executables\n"; + InfoMsg "\nRebuilding the $Build Wine test executables\n"; my $CPUCount = GetCPUCount(); - my $Host = ($Bits == 64 ? "x86_64-w64-mingw32" : "i686-w64-mingw32"); - system("cd '$DataDir/build-mingw$Bits' && set -x && ". + my $Host = ($Build eq "exe64" ? "x86_64-w64-mingw32" : "i686-w64-mingw32"); + system("cd '$DataDir/wine-$Build' && set -x && ". ($NoRm ? "" : "rm -rf * && ") . - "time ../wine/configure --host=$Host --with-wine-tools=../build-native --without-x --without-freetype --disable-winetest && ". + "time ../wine/configure --host=$Host --with-wine-tools=../wine-native --without-x --without-freetype --disable-winetest && ". "time make -j$CPUCount buildtests"); if ($? != 0) { - LogMsg "Build cross ($Bits bits) failed\n"; + LogMsg "The $Build Wine crossbuild failed\n"; return !1; }
@@ -100,8 +116,8 @@ sub UpdateWineBuilds($$) my ($Targets, $NoRm) = @_;
return BuildNative($NoRm) && - BuildCross($Targets, $NoRm, 32) && - BuildCross($Targets, $NoRm, 64); + BuildCross($Targets, $NoRm, "exe32") && + BuildCross($Targets, $NoRm, "exe64"); }
diff --git a/testbot/bin/build/WineReconfig.pl b/testbot/bin/build/WineReconfig.pl index b30ddd190..2416eebfa 100755 --- a/testbot/bin/build/WineReconfig.pl +++ b/testbot/bin/build/WineReconfig.pl @@ -50,19 +50,27 @@ sub BuildWine($$$$) my ($Targets, $NoRm, $Build, $Extras) = @_;
return 1 if (!$Targets->{$Build}); - mkdir "$DataDir/build-$Build" if (!-d "$DataDir/build-$Build"); + # FIXME Temporary code to ensure compatibility during the transition + my $OldDir = "build-$Build"; + if (-d "$DataDir/$OldDir" and !-d "$DataDir/wine-$Build") + { + rename("$DataDir/$OldDir", "$DataDir/wine-$Build"); + # Add a symlink from compatibility with older server-side TestBot scripts + symlink("wine-$Build", "$DataDir/$OldDir"); + } + mkdir "$DataDir/wine-$Build" if (!-d "$DataDir/wine-$Build");
# If $NoRm is not set, rebuild from scratch to make sure cruft will not # accumulate InfoMsg "\nRebuilding the $Build Wine\n"; my $CPUCount = GetCPUCount(); - system("cd '$DataDir/build-$Build' && set -x && ". + system("cd '$DataDir/wine-$Build' && set -x && ". ($NoRm ? "" : "rm -rf * && ") . "time ../wine/configure $Extras && ". "time make -j$CPUCount"); if ($? != 0) { - LogMsg "The $Build build failed\n"; + LogMsg "The $Build Wine build failed\n"; return !1; }
@@ -75,7 +83,7 @@ sub UpdateWineBuilds($$)
return BuildWine($Targets, $NoRm, "win32", "") && BuildWine($Targets, $NoRm, "wow64", "--enable-win64") && - BuildWine($Targets, $NoRm, "wow32", "--with-wine64='$DataDir/build-wow64'"); + BuildWine($Targets, $NoRm, "wow32", "--with-wine64='$DataDir/wine-wow64'"); }
diff --git a/testbot/bin/build/WineTest.pl b/testbot/bin/build/WineTest.pl index 9c264b485..9be73a42f 100755 --- a/testbot/bin/build/WineTest.pl +++ b/testbot/bin/build/WineTest.pl @@ -58,7 +58,7 @@ sub BuildWine($$)
InfoMsg "\nRebuilding the $Build Wine\n"; my $CPUCount = GetCPUCount(); - system("cd '$DataDir/build-$Build' && set -x && ". + system("cd '$DataDir/wine-$Build' && set -x && ". "time make -j$CPUCount"); if ($? != 0) { diff --git a/testbot/lib/Build/Utils.pm b/testbot/lib/Build/Utils.pm index 038c188f2..fd1b8467c 100644 --- a/testbot/lib/Build/Utils.pm +++ b/testbot/lib/Build/Utils.pm @@ -326,9 +326,9 @@ sub RunWine($$$) { my ($Build, $Cmd, $CmdArgs) = @_;
- my $Magic = `cd '$DataDir/build-$Build' && file $Cmd`; + my $Magic = `cd '$DataDir/wine-$Build' && file $Cmd`; my $Wine = ($Magic =~ /ELF 64/ ? "./wine64" : "./wine"); - return system("cd '$DataDir/build-$Build' && set -x && ". + return system("cd '$DataDir/wine-$Build' && set -x && ". "time $Wine $Cmd $CmdArgs"); }
@@ -354,7 +354,7 @@ sub CreateWinePrefix($$) { # Ensure the WinePrefix has been fully created and the registry files # saved before returning. - system("cd '$DataDir/build-$Build' && ./server/wineserver -w"); + system("cd '$DataDir/wine-$Build' && ./server/wineserver -w"); }
return undef;