source: other-projects/diffcol/trunk/diffcol/logdiff.pm@ 21711

Last change on this file since 21711 was 21711, checked in by oranfry, 14 years ago

bringing across the diffcol project

File size: 879 bytes
Line 
1package logdiff;
2
3BEGIN {
4 die "GSDLHOME not set\n" unless defined $ENV{'GSDLHOME'};
5 die "GSDLOS not set\n" unless defined $ENV{'GSDLOS'};
6 unshift (@INC, "$ENV{'GSDLHOME'}/perllib");
7 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan");
8}
9
10use util;
11use diffutil;
12use Text::Diff;
13
14sub test_log
15{
16 my ($full_mlog_dir, $full_tlog_dir) = @_;
17
18 my @mlog_files = &diffutil::files_in_dir($full_mlog_dir);
19 my @tlog_files = &diffutil::files_in_dir($full_tlog_dir);
20
21 my $full_mlog_file = &util::filename_cat($full_mlog_dir,$mlog_files[scalar(@mlog_files)-1]);
22 my $full_tlog_file = &util::filename_cat($full_tlog_dir,$tlog_files[scalar(@tlog_files)-1]);
23 my $test_result = diff $full_mlog_file, $full_tlog_file, { STYLE => "Table" };
24 if(!($test_result eq ""))
25 {
26 return "Difference Report: $test_result";
27 }
28 else
29 {
30 return "";
31 }
32}
33
341;
Note: See TracBrowser for help on using the repository browser.