added list of failed packages to output of syntaxCheck.t
This commit is contained in:
parent
5dcdab0700
commit
9cf20110c8
1 changed files with 10 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ use Test::More;
|
||||||
plan skip_all => 'set TEST_SYNTAX to enable this test' unless $ENV{TEST_SYNTAX};
|
plan skip_all => 'set TEST_SYNTAX to enable this test' unless $ENV{TEST_SYNTAX};
|
||||||
|
|
||||||
my @modules;
|
my @modules;
|
||||||
|
my @failed_packages;
|
||||||
my $wgLib = WebGUI::Test->lib;
|
my $wgLib = WebGUI::Test->lib;
|
||||||
diag("Checking modules in $wgLib");
|
diag("Checking modules in $wgLib");
|
||||||
File::Find::find( \&getWebGUIModules, $wgLib);
|
File::Find::find( \&getWebGUIModules, $wgLib);
|
||||||
|
|
@ -33,6 +34,15 @@ diag("Planning on $numTests tests");
|
||||||
foreach my $package (@modules) {
|
foreach my $package (@modules) {
|
||||||
my $returnVal = system("$^X -I$wgLib -wc $package");
|
my $returnVal = system("$^X -I$wgLib -wc $package");
|
||||||
is($returnVal, 0, "syntax check for $package");
|
is($returnVal, 0, "syntax check for $package");
|
||||||
|
push(@failed_packages, $package) if ($returnVal != 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (@failed_packages) {
|
||||||
|
print "\n# Compilation FAILED for the following packages:\n";
|
||||||
|
foreach my $package (@failed_packages) {
|
||||||
|
print "# - $package\n";
|
||||||
|
}
|
||||||
|
print "\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
#----------------------------------------
|
#----------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue