Zebediah Figura : testbot: Rebuild the tools when they are modified.
Module: tools Branch: master Commit: 60e0adff6f0bfe497541859ec2c04556865b97c6 URL: http://source.winehq.org/git/tools.git/?a=commit;h=60e0adff6f0bfe497541859ec... Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Dec 13 17:43:26 2017 +0100 testbot: Rebuild the tools when they are modified. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/bin/build/Build.pl | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/testbot/bin/build/Build.pl b/testbot/bin/build/Build.pl index 82cd66a..96cf741 100755 --- a/testbot/bin/build/Build.pl +++ b/testbot/bin/build/Build.pl @@ -74,6 +74,7 @@ sub ApplyPatch($$$) { my ($PatchFile, $PatchType, $BaseName) = @_; + my $NeedBuildNative = !1; my $NeedMakeMakefiles = !1; my $NeedMakefile = 0; my $NeedMakeInclude = !1; @@ -85,8 +86,8 @@ sub ApplyPatch($$$) { my $Line; while (defined($Line = <FH>) && - (! $NeedMakeMakefiles || $NeedMakefile == 0 || ! $NeedMakeInclude || ! $NeedBuildDeps || - ! $NeedImplib || ! $NeedAutoconf || ! $NeedConfigure)) + (! $NeedBuildNative || ! $NeedMakeMakefiles || $NeedMakefile == 0 || ! $NeedMakeInclude || + ! $NeedBuildDeps || ! $NeedImplib || ! $NeedAutoconf || ! $NeedConfigure)) { if ($Line =~ m=^diff.*(?:tests/Makefile\.in|Make\.vars\.in|Make\.rules\.in|Maketest\.rules\.in)$=) { @@ -117,6 +118,14 @@ sub ApplyPatch($$$) { $NeedMakeMakefiles = $NeedConfigure = 1; } + elsif ($Line =~ m=^diff.*tools/makedep.c=) + { + $NeedBuildNative = $NeedMakeMakefiles = $NeedConfigure = 1; + } + elsif ($Line =~ m=^diff.*tools/(?:winebuild|wrc)=) + { + $NeedBuildNative = 1; + } } close FH; } @@ -132,6 +141,15 @@ sub ApplyPatch($$$) return (-1, $NeedMakeInclude, $NeedBuildDeps, $NeedImplib, $NeedConfigure); } + if ($NeedBuildNative) + { + InfoMsg "Building tools\n"; + if (!BuildNative()) + { + return (-1, $NeedMakeInclude, $NeedBuildDeps, $NeedImplib, $NeedConfigure); + } + } + if ($NeedMakeMakefiles) { InfoMsg "Running make_makefiles\n"; @@ -190,6 +208,25 @@ sub CountCPUs() $ncpus ||= 1; } +sub BuildNative() +{ + mkdir "$DataDir/build-native" if (! -d "$DataDir/build-native"); + system("( cd $DataDir/build-native && set -x && " . + " rm -rf * && " . + " time ../wine/configure --enable-win64 --without-x --without-freetype && " . + " time make -j$ncpus depend && " . + " time make -j$ncpus __tooldeps__ " . + ") >>$LogDir/Build.log 2>&1"); + + if ($? != 0) + { + LogMsg "Build native failed\n"; + return !1; + } + + return 1; +} + sub BuildTestExecutable($$$$$$$$) { my ($BaseName, $PatchType, $Bits, $NeedConfigure, $NeedMakefile,
participants (1)
-
Alexandre Julliard