- Timestamp:
- 2022-10-16T18:51:49+13:00 (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/nightly-tasks/diffcol/trunk/diffcol/gdbdiff.pm
r35231 r36807 106 106 $test_text =~ s@(tmp[\\\/])(\d*[\\\/])@$1@g; 107 107 108 109 #print STDERR "@@@@ DEBUGGING: $debugging\n"; 110 #print STDERR "******** full_modeldb: $full_modeldb\n$model_text\n\n"; 111 #print STDERR "******** full_testdb: $full_testdb\n$test_text\n\n"; 112 108 113 # if the OS doesn't match and one of them is windows, extra work needs to be done to bring the db files 109 114 # in test and model collection to an even base for comparison … … 231 236 } # end of equalising differences between a windows collection's db file and linux coll's db file 232 237 238 239 # Windows or linux: if index is a flat db file, then ensure the docIDs listed in <contains> field of 240 # both test and model flat db file are alphabetically sorted. So to the numbers in <mdoffset> field. 241 # Despite PERL_PERTURB_KEYS envvar being set to 0 on both machine when generating model collections 242 # and when test collections were generated on test machine, still collections like Images-GPS and some 243 # other colls list items in <contains> and <mdoffset> in different orders. So reordering alphabetically. 244 #if($dbname =~ m/$strColName/) { 245 # regex modifiers mge: multi-line, global (replace as many as match), e allows function call in substitution 246 ##$model_text =~ s@^<contains>(.*)@sort_contains_field($1, "MODEL", $debugging)@mge; 247 ##$test_text =~ s@^<contains>(.*)@sort_contains_field($1, "TEST", $debugging)@mge; 248 # $model_text =~ s@^<(contains|mdoffset)>(.*)@sort_field_value($1, $2, "MODEL", $debugging)@mge; 249 # $test_text =~ s@^<(contains|mdoffset)>(.*)@sort_field_value($1, $2, "TEST", $debugging)@mge; 250 #} 251 233 252 # The following block of code is necessary to deal with tmp (html) source files generated when using PDFBox 234 253 # These tmpdirs are located inside the toplevel *greenstone* directory … … 302 321 # Call diff? 303 322 } 323 324 # Unused, but may come in handy when debugging again: regex substitution helper function 325 sub sort_field_value { 326 my($fieldname, $fieldvalue, $displayStr, $debugging) = @_; 327 328 print STDERR "\n$displayStr BEFORE sort: <$fieldname>$fieldvalue\n" if($debugging); 329 330 $fieldvalue =~ s@(\r|\n|\\n)*$@@; # get rid of trailing newlines/carriage returns 331 my @values_list = split(';', $fieldvalue); 332 @values_list = sort @values_list; 333 $fieldvalue = "<$fieldname>".join(';', @values_list). "\n"; 334 335 print STDERR "$displayStr AFTER sort: $fieldvalue\n" if($debugging); 336 337 return $fieldvalue; 338 } 339 304 340 305 341 # returns true if the contents are windows AND it matters for the diffing on the db that it's windows
Note:
See TracChangeset
for help on using the changeset viewer.