Index: other-projects/nightly-tasks/diffcol/trunk/diffcol/diffcol.pl
===================================================================
--- other-projects/nightly-tasks/diffcol/trunk/diffcol/diffcol.pl (revision 27729)
+++ other-projects/nightly-tasks/diffcol/trunk/diffcol/diffcol.pl (revision 27730)
@@ -115,5 +115,5 @@
sub IndivTest
{
- my ($strModelCol,$strTestCol) = @_;
+ my ($strModelCol,$strTestCol,$strColName) = @_;
my @Errors = ();
my $intNumberOfErrors = 0;
@@ -127,5 +127,5 @@
my $strTestFolder = &FileUtils::filenameConcatenate($strTestCol,$strEachFolder);
$intNumberOfErrors = scalar(@Errors);
- push(@Errors,TestEach($strModelFolder,$strTestFolder,0));
+ push(@Errors,TestEach($strModelFolder,$strTestFolder,0,$strColName));
$intNumberOfErrors = scalar(@Errors) - $intNumberOfErrors;
VobPrint("End Comparing \"$strEachFolder\"\n",0);
@@ -404,5 +404,5 @@
VobPrint("Detail Testing Start\n",$intLevel);
}
- push(@Errors,TestEach($strModelCol,$strTestCol,$intLevel));
+ push(@Errors,TestEach($strModelCol,$strTestCol,$intLevel,$strColName));
$intNumberDiffs = scalar(@Errors) - $intNumberDiffs;
@@ -564,5 +564,5 @@
sub TestEach
{
- my ($strModel,$strTest,$intLevel) = @_;
+ my ($strModel,$strTest,$intLevel,$strColName) = @_;
my @Errors = ();
@@ -593,5 +593,5 @@
if(!($strEachFile eq "log" || $strEachFile eq "earliestDatestamp" || $strEachFile =~ m/\.cfg$/g || $strEachFile =~ m/\.((g|j|l|b)db|idh|i.*|wa|td|tsd|ti|t|tl|w|jpe?g|gif|png)$/g))
{
- push(@Errors,TestEach($strNewModel,$strNewTest,$intLevel));
+ push(@Errors,TestEach($strNewModel,$strNewTest,$intLevel,$strColName));
}
else
@@ -613,5 +613,5 @@
if(!($strEachFile eq "log" || $strEachFile eq "earliestDatestamp" || $strEachFile =~ m/\.cfg$/g || $strEachFile =~ m/\.((g|j|l|b)db|idh|i.*|wa|td|tsd|ti|t|tl|w|jpe?g|gif|png)$/g))
{
- push(@Errors,TestEach($strNewModel,$strNewTest,$intLevel));
+ push(@Errors,TestEach($strNewModel,$strNewTest,$intLevel,$strColName));
}
}
@@ -625,5 +625,6 @@
else
{
- my $ignore_line_re = ".*\\s*\\n*";
+ my $ignore_line_re = ".*\\s*\\n*";
+
my $strResult;
@@ -643,5 +644,14 @@
$model_contents =~ s/$ignore_line_re//g;
$test_contents =~ s/$ignore_line_re//g;
+
+ # tmp dirs have subdirs with random numbers in name, remove randomly named subdir portion of path
+ $model_contents =~ s@(tmp[\\\/])(\d*[\\\/])@$1@g;
+ $test_contents =~ s@(tmp[\\\/])(\d*[\\\/])@$1@g;
+ # remove all absolute paths upto collect folder from elements
+ $model_contents =~ s@((http:\/\/)?).*(collect[\\\/]$strColName)@$1$3@g;
+ $test_contents =~ s@((http:\/\/)?).*(collect[\\\/]$strColName)@$1$3@g;
+
+
# equalise/normalise the two doc.xml files for OS differences, if there are any
my $testIsWin = &isDocXMLFileWindows($test_contents);
@@ -687,4 +697,6 @@
else
{
+# print STDERR "**** Diff is: $strResult\n"; # print any differences to the screen
+
my $strOutput = "Difference Report:\n$strResult\n";
if ( $strOutputFormat eq "xml" ) {
@@ -873,5 +885,5 @@
if ($gv_strMode eq "Individual")
{
- @ErrorsInEachCol = IndivTest($strModelCol,$strTestCol);
+ @ErrorsInEachCol = IndivTest($strModelCol,$strTestCol,$strColName);
}
#----##
Index: other-projects/nightly-tasks/diffcol/trunk/diffcol/gdbdiff.pm
===================================================================
--- other-projects/nightly-tasks/diffcol/trunk/diffcol/gdbdiff.pm (revision 27729)
+++ other-projects/nightly-tasks/diffcol/trunk/diffcol/gdbdiff.pm (revision 27730)
@@ -66,8 +66,11 @@
# The total_numbytes field can vary depending on how many backslashes exist in the urls in the main body text, as each
# of these windows slashes get escaped with another backslash, and the resulting string is used as key into rel link db
- my $ignore_line_re = "\n<(lastmodified|lastmodifieddate|oailastmodified|oailastmodifieddate|total_numbytes)>([^\n])*";
+ my $ignore_line_re = "\n<(lastmodified|lastmodifieddate|oailastmodified|oailastmodifieddate|ex.File.FileModifyDate|ex.File.FilePermissions|total_numbytes)>([^\n])*";
$model_text =~ s/$ignore_line_re//g;
$test_text =~ s/$ignore_line_re//g;
+ # tmp dirs have subdirs with random numbers in name, remove subdir
+ $model_text =~ s@(tmp[\\\/])(\d*[\\\/])@$1@g;
+ $test_text =~ s@(tmp[\\\/])(\d*[\\\/])@$1@g;
# if the OS doesn't match and one of them is windows, extra work needs to be done to bring the db files