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;