Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/bin/Engine.pl | 1 - testbot/bin/Janitor.pl | 2 -- testbot/bin/LibvirtTool.pl | 2 -- testbot/bin/WineRunBuild.pl | 2 -- testbot/bin/WineRunReconfig.pl | 2 -- testbot/bin/WineRunTask.pl | 2 -- testbot/bin/WineRunWineTest.pl | 2 -- testbot/bin/WineSendLog.pl | 2 -- testbot/lib/WineTestBot/Config.pm | 2 ++ testbot/lib/WineTestBot/VMs.pm | 1 - testbot/scripts/CheckWineTestBot.pl | 2 -- 11 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/testbot/bin/Engine.pl b/testbot/bin/Engine.pl index 9ffdf968..81d3afc6 100755 --- a/testbot/bin/Engine.pl +++ b/testbot/bin/Engine.pl @@ -741,7 +741,6 @@ sub main() exit 1; }
- $ENV{PATH} = "/usr/bin:/bin"; $SIG{CHLD} = &REAPER;
$WineTestBot::Engine::Notify::RunningInEngine = 1; diff --git a/testbot/bin/Janitor.pl b/testbot/bin/Janitor.pl index e7662852..537a0dc4 100755 --- a/testbot/bin/Janitor.pl +++ b/testbot/bin/Janitor.pl @@ -76,8 +76,6 @@ sub Error(@) # Setup and command line processing #
-$ENV{PATH} = "/usr/bin:/bin"; - # Grab the command line options my ($Usage, $DryRun); while (@ARGV) diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl index a078fcbd..4000c147 100755 --- a/testbot/bin/LibvirtTool.pl +++ b/testbot/bin/LibvirtTool.pl @@ -87,8 +87,6 @@ EOF # Setup and command line processing #
-$ENV{PATH} = "/usr/bin:/bin"; - # Grab the command line options my ($Usage, $Action, $VMKey); while (@ARGV) diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl index b1349f0d..fdcf770b 100755 --- a/testbot/bin/WineRunBuild.pl +++ b/testbot/bin/WineRunBuild.pl @@ -72,8 +72,6 @@ sub Error(@) # Setup and command line processing #
-$ENV{PATH} = "/usr/bin:/bin"; - my $Usage; sub ValidateNumber($$) { diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl index dcf36f8a..44919fa6 100755 --- a/testbot/bin/WineRunReconfig.pl +++ b/testbot/bin/WineRunReconfig.pl @@ -73,8 +73,6 @@ sub Error(@) # Setup and command line processing #
-$ENV{PATH} = "/usr/bin:/bin"; - my $Usage; sub ValidateNumber($$) { diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl index e6112fd8..6a718494 100755 --- a/testbot/bin/WineRunTask.pl +++ b/testbot/bin/WineRunTask.pl @@ -103,8 +103,6 @@ sub TakeScreenshot($$) # Setup and command line processing #
-$ENV{PATH} = "/usr/bin:/bin"; - my $Usage; sub ValidateNumber($$) { diff --git a/testbot/bin/WineRunWineTest.pl b/testbot/bin/WineRunWineTest.pl index a74877a8..74b974ae 100755 --- a/testbot/bin/WineRunWineTest.pl +++ b/testbot/bin/WineRunWineTest.pl @@ -102,8 +102,6 @@ sub TakeScreenshot($$) # Setup and command line processing #
-$ENV{PATH} = "/usr/bin:/bin"; - my $Usage; sub ValidateNumber($$) { diff --git a/testbot/bin/WineSendLog.pl b/testbot/bin/WineSendLog.pl index 28644fb8..721122ed 100755 --- a/testbot/bin/WineSendLog.pl +++ b/testbot/bin/WineSendLog.pl @@ -406,8 +406,6 @@ EOF # Setup and command line processing #
-$ENV{PATH} = "/usr/bin:/bin"; - my $Usage; sub ValidateNumber($$) { diff --git a/testbot/lib/WineTestBot/Config.pm b/testbot/lib/WineTestBot/Config.pm index d6267dee..b72968c0 100644 --- a/testbot/lib/WineTestBot/Config.pm +++ b/testbot/lib/WineTestBot/Config.pm @@ -71,6 +71,8 @@ $BinDir = "$::RootDir/bin";
# Sanitize the environment for system() & co delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; # from perlsec +$ENV{PATH} = "/usr/bin:/bin"; +
# See the ScheduleOnHost() documentation in lib/WineTestBot/Jobs.pm $MaxRevertingVMs = 1; diff --git a/testbot/lib/WineTestBot/VMs.pm b/testbot/lib/WineTestBot/VMs.pm index 67705474..5d738e2a 100644 --- a/testbot/lib/WineTestBot/VMs.pm +++ b/testbot/lib/WineTestBot/VMs.pm @@ -447,7 +447,6 @@ sub Run($$$$$$) WineTestBot::Log::LogMsg("Starting child: @$Args\n"); $ChildSetup->($VM, $SetupData);
- $ENV{PATH} = "/usr/bin:/bin"; exec(@$Args) or WineTestBot::Log::LogMsg("Unable to exec $Tool: $!\n");
diff --git a/testbot/scripts/CheckWineTestBot.pl b/testbot/scripts/CheckWineTestBot.pl index 0af2550c..3ca4fde9 100755 --- a/testbot/scripts/CheckWineTestBot.pl +++ b/testbot/scripts/CheckWineTestBot.pl @@ -38,8 +38,6 @@ sub BEGIN use WineTestBot::Config; use WineTestBot::Engine::Notify;
-$ENV{PATH} = "/usr/bin:/bin"; - my $rc = 0; if (! PingEngine()) {
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/bin/build/Build.pl | 2 -- testbot/bin/build/Reconfig.pl | 2 -- testbot/bin/build/WineReconfig.pl | 2 -- testbot/bin/build/WineTest.pl | 2 -- testbot/lib/Build/Utils.pm | 2 ++ testbot/lib/WineTestBot/Config.pm | 5 +++++ 6 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/testbot/bin/build/Build.pl b/testbot/bin/build/Build.pl index 894686da..f23b733d 100755 --- a/testbot/bin/build/Build.pl +++ b/testbot/bin/build/Build.pl @@ -114,8 +114,6 @@ sub BuildTestExecutables($$$) # Setup and command line processing #
-$ENV{PATH} = "/usr/lib/ccache:/usr/bin:/bin"; - my ($Usage, $PatchFile, $MissionStatement); while (@ARGV) { diff --git a/testbot/bin/build/Reconfig.pl b/testbot/bin/build/Reconfig.pl index c43fbda3..72725bf4 100755 --- a/testbot/bin/build/Reconfig.pl +++ b/testbot/bin/build/Reconfig.pl @@ -110,8 +110,6 @@ sub UpdateWineBuilds($$) # Setup and command line processing #
-$ENV{PATH} = "/usr/lib/ccache:/usr/bin:/bin"; - my ($Usage, $OptUpdate, $OptBuild, $OptNoRm, $MissionStatement); while (@ARGV) { diff --git a/testbot/bin/build/WineReconfig.pl b/testbot/bin/build/WineReconfig.pl index 4e03c314..9f0544e3 100755 --- a/testbot/bin/build/WineReconfig.pl +++ b/testbot/bin/build/WineReconfig.pl @@ -142,8 +142,6 @@ sub UpdateWinePrefixes($) # Setup and command line processing #
-$ENV{PATH} = "/usr/lib/ccache:/usr/bin:/bin"; - my ($Usage, $OptUpdate, $OptBuild, $OptNoRm, $OptAddOns, $OptWinePrefix, $MissionStatement); while (@ARGV) { diff --git a/testbot/bin/build/WineTest.pl b/testbot/bin/build/WineTest.pl index f848157f..a3997361 100755 --- a/testbot/bin/build/WineTest.pl +++ b/testbot/bin/build/WineTest.pl @@ -209,8 +209,6 @@ sub TestExe($$$) # Setup and command line processing #
-$ENV{PATH} = "/usr/lib/ccache:/usr/bin:/bin"; - my $Action = ""; my ($Usage, $OptNoSubmit, $MissionStatement, $FileName, $BaseTag); while (@ARGV) diff --git a/testbot/lib/Build/Utils.pm b/testbot/lib/Build/Utils.pm index 61b47a74..d31db820 100644 --- a/testbot/lib/Build/Utils.pm +++ b/testbot/lib/Build/Utils.pm @@ -40,6 +40,8 @@ use WineTestBot::Missions; use WineTestBot::PatchUtils; use WineTestBot::Utils;
+WineTestBot::Config::PrependPaths("/usr/lib/ccache"); +
# # Logging and error handling diff --git a/testbot/lib/WineTestBot/Config.pm b/testbot/lib/WineTestBot/Config.pm index b72968c0..b68c4f59 100644 --- a/testbot/lib/WineTestBot/Config.pm +++ b/testbot/lib/WineTestBot/Config.pm @@ -73,6 +73,11 @@ $BinDir = "$::RootDir/bin"; delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; # from perlsec $ENV{PATH} = "/usr/bin:/bin";
+sub PrependPaths(@) +{ + map { $ENV{PATH} = "$_:$ENV{PATH}" if (-d $_) } reverse @_; +} +
# See the ScheduleOnHost() documentation in lib/WineTestBot/Jobs.pm $MaxRevertingVMs = 1;