h-c: infinite context for file MD5 sum comparison
Since C&CS checkers are often interested in the list of files that have stayed the same between a firmware release and the result of compiling the C&CS for that firmware (ie. to see if there are binaries which have not changed, which is unlikely because each compiler configuration outputs slightly different binaries), add "infinite" lines of context in the diff command for the MD5 checksum comparison. This will include all files that have not changed (in addition to the files that have changed). I didn't immediately see a flag for infinite lines of context in the diff manpage so I'm using a big number for now (2,000,000,000).
This commit is contained in:
parent
349f4eee34
commit
31e2c78e8c
1 changed files with 4 additions and 1 deletions
|
@ -198,8 +198,11 @@ my $comparedFiles2sha1 = MD5SumFiles($comparedDir, \@c, $comparedTempFile);
|
||||||
system("/bin/echo >> $diffOutputFile 2>&1");
|
system("/bin/echo >> $diffOutputFile 2>&1");
|
||||||
system("/bin/echo 'File contents comparisons (MD5):' >> $diffOutputFile 2>&1");
|
system("/bin/echo 'File contents comparisons (MD5):' >> $diffOutputFile 2>&1");
|
||||||
|
|
||||||
|
# for C&CS checking, the list of files that are the same (esp. binary) is useful
|
||||||
|
# so use infinite number of lines of context to show these files
|
||||||
|
# TODO: replace -U[big_number] with proper infinite context flag (ossguy)
|
||||||
system(
|
system(
|
||||||
"/usr/bin/diff -u $origTempFile $comparedTempFile >> $diffOutputFile 2>&1");
|
"/usr/bin/diff -U2000000000 $origTempFile $comparedTempFile >> $diffOutputFile 2>&1");
|
||||||
|
|
||||||
$diffExitCode = $?;
|
$diffExitCode = $?;
|
||||||
unlink($origTempFile, $comparedTempFile);
|
unlink($origTempFile, $comparedTempFile);
|
||||||
|
|
Loading…
Reference in a new issue