Signed-off-by: Zebediah Figura z.figura12@gmail.com --- testbot/bin/build/Build.pl | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/testbot/bin/build/Build.pl b/testbot/bin/build/Build.pl index 051039f..474cb84 100755 --- a/testbot/bin/build/Build.pl +++ b/testbot/bin/build/Build.pl @@ -74,6 +74,7 @@ sub ApplyPatch($$$) { my ($PatchFile, $PatchType, $BaseName) = @_;
+ my $NeedMakeMakefiles = !1; my $NeedMakefile = 0; my $NeedMakeInclude = !1; my $NeedBuildDeps = !1; @@ -84,7 +85,7 @@ sub ApplyPatch($$$) { my $Line; while (defined($Line = <FH>) && - ($NeedMakefile == 0 || ! $NeedMakeInclude || ! $NeedBuildDeps || + (! $NeedMakeMakefiles || $NeedMakefile == 0 || ! $NeedMakeInclude || ! $NeedBuildDeps || ! $NeedImplib || ! $NeedAutoconf || ! $NeedConfigure)) { if ($Line =~ m=^diff.*(?:tests/Makefile.in|Make.vars.in|Make.rules.in|Maketest.rules.in)$=) @@ -111,6 +112,10 @@ sub ApplyPatch($$$) { $NeedConfigure = 1; } + elsif ($Line =~ m=^new file= || $Line =~ m=^deleted file= || $Line =~ m=^rename=) + { + $NeedMakeMakefiles = 1; + } } close FH; } @@ -125,6 +130,20 @@ sub ApplyPatch($$$) return (-1, $NeedMakeInclude, $NeedBuildDeps, $NeedImplib, $NeedConfigure); }
+ if ($NeedMakeMakefiles) + { + InfoMsg "Running make_makefiles\n"; + system("( cd $DataDir/wine && set -x && " . + " ./tools/make_makefiles " . + ") >> $LogDir/Build.log 2>&1"); + if ($? != 0) + { + LogMsg "make_makefiles failed\n"; + return (-1, $NeedMakeInclude, $NeedBuildDeps, $NeedImplib, $NeedConfigure); + } + $NeedConfigure = 1; + } + if ($NeedAutoconf && ! $NeedConfigure) { InfoMsg "Running autoconf\n";
Unfortunately it does not work because git apply does not commit the patch and tools/make_makefiles only takes committed files into account. So when make_makefiles is run it does not update configure.ac.
git apply suggests using git am to create a commit but git am compalins the patch is not in mbox format. There's probably a reasonably simple solution to that. Either that or modify make_makefiles to take into account uncommitted files but I don't know it that would be accepted by Alexandre.
It may also make sense to re-run make_makefiles and makedep when they are modified. It seems you've run into that one recently. This can totally go in a separate patch though.
Finally for anyone interested I updated the wtbsuite with 3 new patches around on this theme:
* WTBS kernel32:timer: Test + make_makefiles patch. https://github.com/fgouget/wine/commit/1b76e754b429256e9fd68c78e5134c4e2ff2e...
* WTBS kernel32:atom: Test + makedep patch. https://github.com/fgouget/wine/commit/67bfa38ec87496552f7bc9a4ebc9ff45b09f7...
* WTBS icmp:dummy: Add a new test directory. https://github.com/fgouget/wine/commit/4a4550554f11f8273dfc1cfcd0bc733d40898...
The wtbsuite is the test suite for the Wine TestBot. It consists of commits to a special Wine branch. You can pick any of the commit and submit a job to the TestBot to verify that it handles the patch correctly. One can get the test suite on GitHub:
https://github.com/fgouget/wine/commits/wtbsuite
On 11/27/2017 12:25 PM, Francois Gouget wrote:
Unfortunately it does not work because git apply does not commit the patch and tools/make_makefiles only takes committed files into account. So when make_makefiles is run it does not update configure.ac.
git apply suggests using git am to create a commit but git am compalins the patch is not in mbox format. There's probably a reasonably simple solution to that. Either that or modify make_makefiles to take into account uncommitted files but I don't know it that would be accepted by Alexandre.
'git apply' followed by 'git add -A', perhaps? Or would that pull in any undesirable files?
I can download a patch from the list and git-am it without any problem. Does the testbot do this differently?
It may also make sense to re-run make_makefiles and makedep when they are modified. It seems you've run into that one recently. This can totally go in a separate patch though.
In theory, yes, but we don't appear to use the modified tools. So we'd need to remove the --with-tools argument first, but I don't know why it's there.
On Mon, 27 Nov 2017, Zebediah Figura wrote:
On 11/27/2017 12:25 PM, Francois Gouget wrote:
Unfortunately it does not work because git apply does not commit the patch and tools/make_makefiles only takes committed files into account. So when make_makefiles is run it does not update configure.ac.
git apply suggests using git am to create a commit but git am compalins the patch is not in mbox format. There's probably a reasonably simple solution to that. Either that or modify make_makefiles to take into account uncommitted files but I don't know it that would be accepted by Alexandre.
'git apply' followed by 'git add -A', perhaps? Or would that pull in any undesirable files?
The patch gets applied to a clean source tree so it could work.
I can download a patch from the list and git-am it without any problem. Does the testbot do this differently?
Actually it depends on the format the patch was sent in. If the developper sent a patch in a format supported by 'git am' then it works, but otherwise it's going to fail (as in the case of the patch I tested).
It may also make sense to re-run make_makefiles and makedep when they are modified. It seems you've run into that one recently. This can totally go in a separate patch though.
In theory, yes, but we don't appear to use the modified tools. So we'd need to remove the --with-tools argument first, but I don't know why it's there.
The native tools we need to compile the tests, makedep & co, are in the build-native tree. Currently the TestBot assumes that the test patches don't modify these tools so Build.pl does not do anything in the build-native tree. It just uses it for --with-tools.
build-native is supposed to get updated when Wien itself is updated and so that's the job of BuildNative() in Reconfig.pl.