Changeset 28238
- Timestamp:
- 2013-09-06T22:03:08+12:00 (11 years ago)
- Location:
- other-projects/nightly-tasks/diffcol/trunk/diffcol
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/nightly-tasks/diffcol/trunk/diffcol/diffcol.pl
r28172 r28238 293 293 my $strModelGdb = &FileUtils::filenameConcatenate($strModelCol,"index","text","$strColName.gdb"); 294 294 my $strTestGdb = &FileUtils::filenameConcatenate($strTestCol,"index","text","$strColName.gdb"); 295 my $strGdbError = &GdbDiff($strModelGdb,$strTestGdb,$strOutputFormat,$intLevel,$strColName ); # returns 0 if no error295 my $strGdbError = &GdbDiff($strModelGdb,$strTestGdb,$strOutputFormat,$intLevel,$strColName,$strTestCol,$strModelCol); # returns 0 if no error 296 296 if($strGdbError) { 297 297 push(@Errors,$strGdbError); … … 301 301 $strModelGdb = &FileUtils::filenameConcatenate($strModelCol,"archives","archiveinf-doc.gdb"); 302 302 $strTestGdb = &FileUtils::filenameConcatenate($strTestCol,"archives","archiveinf-doc.gdb"); 303 $strGdbError = &GdbDiff($strModelGdb,$strTestGdb,$strOutputFormat,$intLevel,$strColName );303 $strGdbError = &GdbDiff($strModelGdb,$strTestGdb,$strOutputFormat,$intLevel,$strColName,$strTestCol,$strModelCol); 304 304 if($strGdbError) { 305 305 push(@Errors,$strGdbError); … … 308 308 $strModelGdb = &FileUtils::filenameConcatenate($strModelCol,"archives","archiveinf-src.gdb"); 309 309 $strTestGdb = &FileUtils::filenameConcatenate($strTestCol,"archives","archiveinf-src.gdb"); 310 $strGdbError = &GdbDiff($strModelGdb,$strTestGdb,$strOutputFormat,$intLevel,$strColName );310 $strGdbError = &GdbDiff($strModelGdb,$strTestGdb,$strOutputFormat,$intLevel,$strColName,$strTestCol,$strModelCol); 311 311 if($strGdbError) { 312 312 push(@Errors,$strGdbError); … … 322 322 sub GdbDiff 323 323 { 324 my ($strModelGdb,$strTestGdb,$strOutputFormat,$intLevel,$strColName ) = @_;324 my ($strModelGdb,$strTestGdb,$strOutputFormat,$intLevel,$strColName,$strTestCol,$strModelCol) = @_; 325 325 326 326 my $strGdbError = 0; … … 329 329 { 330 330 #my $strGdbError = gdbdiff::test_gdb($strModelGdb, $strTestGdb); 331 $strGdbError = gdbdiff::test_gdb($strModelGdb, $strTestGdb, $strColName,$gv_test_os, $gv_model_os );331 $strGdbError = gdbdiff::test_gdb($strModelGdb, $strTestGdb, $strColName,$gv_test_os, $gv_model_os,$strTestCol,$strModelCol); 332 332 if($strGdbError ne "") 333 333 { -
other-projects/nightly-tasks/diffcol/trunk/diffcol/gdbdiff.pm
r28224 r28238 46 46 sub test_gdb 47 47 { 48 my ($full_modeldb, $full_testdb, $strColName, $test_os, $model_os ) = @_;48 my ($full_modeldb, $full_testdb, $strColName, $test_os, $model_os, $strTestCol, $strModelCol) = @_; 49 49 50 50 # print "Now is testing database\n"; … … 105 105 106 106 my ($win_text, $lin_text); # references 107 my $collection_path = $strTestCol; # full path to a windows collection 108 107 109 if($testIsWin) { 110 $collection_path = $strTestCol; # test collection path is windows 108 111 $win_text = \$test_text; 109 112 $lin_text = \$model_text; 110 113 } else { 114 $collection_path = $strModelCol; # model collection path is windows 111 115 $win_text = \$model_text; 112 116 $lin_text = \$test_text; … … 114 118 115 119 if($dbname =~ m/archiveinf-doc/) { 120 121 (my $collection_path_re = $collection_path) =~ s@\\@\\\\@g; 122 116 123 my $tmp = ""; # rebuild windows file's set of lines after processing them one by one 117 124 … … 122 129 # assoc-file and meta-file contain filepaths, ensure these are long windows file paths now (will later convert to linux slashes) 123 130 if($line =~ m@^<(assoc-file|meta-file|src-file)>(.*)(\s+)@s) { 131 my ($field, $value, $suffix) = ($1, $2, $3); 132 $line = $value; # it may be a short file name 124 133 125 if($2 !~ m/^\@/) { # if the path doesn't use a "relative" @GSPATH@ placeholder string, but is an absolute path instead 126 $line = $2; # it may be a short file name 127 # perhaps test here if it is a shortfilename? should match /CAPS....~number(.ext)/ 128 129 $line = "<$1>".&Win32::GetLongPathName($line)."$3"; # make it a long file name and prefix assoc-file/meta-file tagname to it again 134 if($line !~ m/^\@/) { # if the path doesn't use a "relative" @GSPATH@ placeholder string, but is an absolute path instead 135 # perhaps test here if it is a shortfilename? should match /CAPS....~number(.ext)/ 136 $line = "<$field>".&Win32::GetLongPathName($line)."$suffix"; # make it a long file name and prefix assoc-file/meta-file tagname to it again 137 } 138 else { # if $line contains @THISCOLLECTIONPATH@, still need to deal with DOS filenames suffixes: 139 # replace placeholder with absolute path and expand to long filename, then insert placeholder in its original place again 140 $line =~ s/\@THISCOLLECTPATH\@/$collection_path/; 141 $line = &Win32::GetLongPathName($line); 142 $line =~ s/^$collection_path_re/\@THISCOLLECTPATH\@/; 143 $line = "<$field>".$line."$suffix"; 130 144 } 131 145 }
Note:
See TracChangeset
for help on using the changeset viewer.