Francois Gouget : testbot: Build 32 and 64 bit Windows versions of TestAgentd.
Alexandre Julliard
julliard at winehq.org
Mon Feb 21 15:58:38 CST 2022
Module: tools
Branch: master
Commit: 674f4d6b56eeeb1c1d68123d2c3294629510d665
URL: https://source.winehq.org/git/tools.git/?a=commit;h=674f4d6b56eeeb1c1d68123d2c3294629510d665
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Mon Feb 21 18:33:10 2022 +0100
testbot: Build 32 and 64 bit Windows versions of TestAgentd.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/bin/Janitor.pl | 2 +-
testbot/bin/LibvirtTool.pl | 3 ++-
testbot/bin/WineRunReconfig.pl | 3 ++-
testbot/lib/Build/Utils.pm | 15 +++++++++++----
testbot/src/testagentd/Makefile | 34 ++++++++++++++++++++++------------
5 files changed, 38 insertions(+), 19 deletions(-)
diff --git a/testbot/bin/Janitor.pl b/testbot/bin/Janitor.pl
index 1b5bb33..ab72ac1 100755
--- a/testbot/bin/Janitor.pl
+++ b/testbot/bin/Janitor.pl
@@ -319,7 +319,7 @@ if (opendir(my $dh, "$DataDir/latest"))
# Needed to analyze Wine patches
next if ($Entry eq "winefiles.txt" or $Entry eq "wine-parentsrc.txt");
# Needed to update Windows VMs
- next if ($Entry eq "TestAgentd.exe");
+ next if ($Entry =~ /^TestAgentd(?:32|64)\.exe$/);
# Needed to run the tests
next if ($Entry =~ /^TestLauncher(?:32|64)\.exe$/);
next if ($Entry =~ /^winetest(?:64)?-latest\.exe$/);
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl
index c027d6b..00d1ce4 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -619,7 +619,8 @@ sub CreateSnapshot($$$$)
FatalError("The $VMKey TestAgent server is too old to be upgraded: $Version\n");
}
- if (!$TA->Upgrade("$DataDir/latest/TestAgentd.exe"))
+ my $Bits = ($VM->Type =~ /64/) ? "64" : "32";
+ if (!$TA->Upgrade("$DataDir/latest/TestAgentd$Bits.exe"))
{
my $ErrMessage = $TA->GetLastError();
FatalError("Could not upgrade the $VMKey TestAgent: $ErrMessage\n");
diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl
index 5d9381d..04308f3 100755
--- a/testbot/bin/WineRunReconfig.pl
+++ b/testbot/bin/WineRunReconfig.pl
@@ -467,7 +467,8 @@ if ($NewStatus eq "completed")
if ($VM->Type eq "build")
{
# Only needed for the Windows VMs and only built by the build VMs.
- push @FileNames, "../src/testagentd/TestAgentd.exe";
+ push @FileNames, "../src/testagentd/TestAgentd32.exe",
+ "../src/testagentd/TestAgentd64.exe";
}
foreach my $FileName (@FileNames)
{
diff --git a/testbot/lib/Build/Utils.pm b/testbot/lib/Build/Utils.pm
index 9d16963..9e73cba 100644
--- a/testbot/lib/Build/Utils.pm
+++ b/testbot/lib/Build/Utils.pm
@@ -260,8 +260,12 @@ sub BuildNativeTestAgentd()
sub BuildWindowsTestAgentd()
{
- my $WindowsTestAgentd = "$::RootDir/src/testagentd/TestAgentd.exe";
- my $Before = GetMTime($WindowsTestAgentd);
+ my %Files;
+ foreach my $Bits ("32", "64")
+ {
+ $Files{"Path$Bits"} = "$::RootDir/src/testagentd/TestAgent$Bits.exe";
+ $Files{"Before$Bits"} = GetMTime($Files{"Path$Bits"});
+ }
InfoMsg "\nRebuilding the Windows TestAgentd\n";
my $CPUCount = GetCPUCount();
@@ -273,9 +277,12 @@ sub BuildWindowsTestAgentd()
return !1;
}
- if ($Before != GetMTime($WindowsTestAgentd))
+ foreach my $Bits ("32", "64")
{
- LogMsg "Updated TestAgentd.exe\n";
+ if ($Files{"Before$Bits"} != GetMTime($Files{"Path$Bits"}))
+ {
+ LogMsg "Updated ". basename($Files{"Path$Bits"}) ."\n";
+ }
}
return 1;
}
diff --git a/testbot/src/testagentd/Makefile b/testbot/src/testagentd/Makefile
index 7808af2..645e268 100644
--- a/testbot/src/testagentd/Makefile
+++ b/testbot/src/testagentd/Makefile
@@ -2,10 +2,12 @@ builddir = ../../bin/build
CROSSCC32 = i686-w64-mingw32-gcc
CROSSSTRIP32 = i686-w64-mingw32-strip
+CROSSCC64 = x86_64-w64-mingw32-gcc
+CROSSSTRIP64 = x86_64-w64-mingw32-strip
all: build iso
build: $(builddir)/testagentd
-windows: TestAgentd.exe
+windows: TestAgentd32.exe TestAgentd64.exe
UNIX_SOURCES = testagentd.c platform_unix.c
@@ -20,25 +22,33 @@ $(builddir)/testagentd: $(UNIX_SOURCES:.c=.o)
WIN_SOURCES = testagentd.c platform_windows.c
-TestAgentd.exe: $(WIN_SOURCES:.c=.obj)
- $(CROSSCC32) -o $@ $(WIN_SOURCES:.c=.obj) -lws2_32
+TestAgentd32.exe: $(WIN_SOURCES:.c=.obj32)
+ $(CROSSCC32) -o $@ $(WIN_SOURCES:.c=.obj32) -lws2_32
$(CROSSSTRIP32) $@
-.SUFFIXES: .obj
-.c.obj:
+.SUFFIXES: .obj32
+.c.obj32:
$(CROSSCC32) -Wall -g -c -o $@ $<
-testagentd.o testagentd.obj: platform.h
-platform_unix.o: platform.h list.h
-platform_windows.obj: platform.h list.h
+TestAgentd64.exe: $(WIN_SOURCES:.c=.obj64)
+ $(CROSSCC64) -o $@ $(WIN_SOURCES:.c=.obj64) -lws2_32
+ $(CROSSSTRIP64) $@
+
+.SUFFIXES: .obj64
+.c.obj64:
+ $(CROSSCC64) -Wall -g -c -o $@ $<
+testagentd.o testagentd.obj32 testagentd.obj64: platform.h
+platform_unix.o: platform.h list.h
+platform_windows.obj32 platform_windows.obj64: platform.h list.h
+
iso: winetestbot.iso
-winetestbot.iso: TestAgentd.exe
+winetestbot.iso: windows
rm -rf winetest
mkdir winetest
- cp TestAgentd.exe winetest
+ cp TestAgentd32.exe TestAgentd64.exe winetest
mkisofs="mkisofs"; \
type mkisofs >/dev/null 2>&1 || mkisofs="genisoimage"; \
"$$mkisofs" -quiet -J -r -V "WineTestBot" -input-charset "ascii" -o "winetestbot.iso" winetest
@@ -47,6 +57,6 @@ winetestbot.iso: TestAgentd.exe
clean:
rm -f $(UNIX_SOURCES:.c=.o)
- rm -f $(WIN_SOURCES:.c=.obj)
- rm -f TestAgentd.exe
+ rm -f $(WIN_SOURCES:.c=.obj32) $(WIN_SOURCES:.c=.obj64)
+ rm -f TestAgentd32.exe TestAgentd64.exe
rm -f winetestbot.iso
More information about the wine-cvs
mailing list