From 9ec788a60311b1c766bd3ae22a8a3704eed6e4a6 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 6 Apr 2011 10:01:59 -0500 Subject: [PATCH] fix upgrade script compile checks --- t/00_compile.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/00_compile.t b/t/00_compile.t index db31d160a..174a2111c 100644 --- a/t/00_compile.t +++ b/t/00_compile.t @@ -26,7 +26,7 @@ my $wgLib = catdir($wgRoot, 'lib'); unshift @INC, $wgLib; my @modules = findModules($wgLib); -my @scripts = findScripts(catdir($wgRoot, 'docs', 'upgrades'), catdir($wgRoot, 'sbin')); +my @scripts = findScripts(catdir($wgRoot, 'sbin'), catdir($wgRoot, 'share', 'upgrades', '*')); plan tests => 2 * (scalar @modules + scalar @scripts); my $failed_compile = 0; @@ -75,6 +75,8 @@ for my $script (@scripts) { local $SIG{__WARN__} = sub { $warnings .= shift; }; + # upgrade scripts need a version defined to be able to compile + local $ENV{WEBGUI_UPGRADE_VERSION} = '8.0.0'; eval $to_compile; chomp $warnings; is($@, '', "$short_name compiles successfully");