Module: tools Branch: master Commit: c187941e4d360bd54209dfa44be2a97b822a33e4 URL: https://gitlab.winehq.org/winehq/tools/-/commit/c187941e4d360bd54209dfa44be2...
Author: Francois Gouget fgouget@codeweavers.com Date: Thu Oct 27 17:26:54 2022 +0200
testbot/build: Adapt to the new executable paths.
The executables are now in architecture-specific subdirectories.
---
testbot/bin/build/WineTest.pl | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-)
diff --git a/testbot/bin/build/WineTest.pl b/testbot/bin/build/WineTest.pl index 73cd660c..c92d5914 100755 --- a/testbot/bin/build/WineTest.pl +++ b/testbot/bin/build/WineTest.pl @@ -41,6 +41,8 @@ sub BEGIN $::BuildEnv = 1; }
+use File::Basename; + use Build::Utils; use WineTestBot::Config; use WineTestBot::Missions; @@ -77,6 +79,16 @@ sub SetupTest($$) return $BaseName; }
+sub GetModuleExePath($$;$) +{ + my ($Mission, $ModulePath, $ExeFileName) = @_; + + $ExeFileName ||= basename($ModulePath) .".exe"; + return join("/", GetWineDir($Mission), $ModulePath, + ($Mission->{Build} eq "wow64" ? "x86_64" : "i386") ."-windows", + $ExeFileName); +} + sub WineTestSuite($$$$) { my ($Mission, $NoSubmit, $BaseTag, $Args) = @_; @@ -85,8 +97,8 @@ sub WineTestSuite($$$$) # there are test failures. my $BaseName = SetupTest("WineTest", $Mission); my $Tag = SanitizeTag("$BaseTag-$BaseName"); - my $WineDir = GetWineDir($Mission); - RunWine($Mission, "$WineDir/programs/winetest/winetest.exe", + my $WineTestPath = GetModuleExePath($Mission, "programs/winetest"); + RunWine($Mission, $WineTestPath, "-c -o '$DataDir/$BaseName.report' -t $Tag ". ShArgv2Cmd(@$Args)); if (!-f "$DataDir/$BaseName.report") { @@ -96,8 +108,7 @@ sub WineTestSuite($$$$)
# Send the report to the website if ((!$NoSubmit and !$Mission->{nosubmit}) and - RunWine($Mission, "$WineDir/programs/winetest/winetest.exe", - "-c -s '$DataDir/$BaseName.report'")) + RunWine($Mission, $WineTestPath, "-c -s '$DataDir/$BaseName.report'")) { LogMsg "WineTest failed to send the $BaseName report\n"; # Soldier on in case it's just a network issue @@ -142,8 +153,7 @@ sub TestPatch($$) # Run WineTest. Ignore the exit code since it returns non-zero whenever # there are test failures. my $BaseName = SetupTest("the tests", $Mission); - my $WineDir = GetWineDir($Mission); - RunWine($Mission, "$WineDir/programs/winetest/winetest.exe", + RunWine($Mission, GetModuleExePath($Mission, "programs/winetest"), "-c -o '$DataDir/$BaseName.report' -t do.not.submit ". join(" ", @TestList)); if (!-f "$DataDir/$BaseName.report") @@ -164,8 +174,7 @@ sub GetExecutable($$$) my $Dst = "$DataDir/staging/$TestExecutable"; unlink $Dst;
- my $WineDir = GetWineDir($Mission); - if (!symlink "$WineDir/$Module->{Path}/$TestExecutable", $Dst) + if (!symlink GetModuleExePath($Mission, $Module->{Path}, $TestExecutable), $Dst) { LogMsg "Could not find $TestExecutable: $!\n"; return undef; @@ -191,6 +200,7 @@ sub TestExe($$$) LogMsg "Could not create '$FileName' in the test directory: $!\n"; return 0; } + $FileName = ".\$FileName"; }
# Run the test executable