Accepting request 823017 from openSUSE:Tools
- Make output more diffable and readable - Fix regression in compare_archive - Fix unit tests OBS-URL: https://build.opensuse.org/request/show/823017 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/build-compare?expand=0&rev=117
This commit is contained in:
commit
d72228f6d7
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 27 06:06:06 UTC 2020 - bwiedemann@suse.de
|
||||
|
||||
- Make output more diffable and readable
|
||||
- Fix regression in compare_archive
|
||||
- Fix unit tests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 29 19:20:21 UTC 2020 - olaf@aepfle.de
|
||||
|
||||
|
@ -21,7 +21,7 @@ Summary: Build Result Compare Script
|
||||
License: GPL-2.0+
|
||||
Group: Development/Tools/Building
|
||||
Url: https://github.com/openSUSE/build-compare
|
||||
Version: 20200529T212652.102d844
|
||||
Version: 20200727T175347.d95eb35
|
||||
Release: 0
|
||||
Source1: COPYING
|
||||
Source2: same-build-result.sh
|
||||
|
@ -218,7 +218,7 @@ function unpackage()
|
||||
function comp_file()
|
||||
{
|
||||
echo "comparing $1"
|
||||
if ! diff -au $2 $3; then
|
||||
if ! diff --label old-$1 --label new-$1 -au $2 $3; then
|
||||
if test -z "$check_all"; then
|
||||
rm $2 $3 $4 $5
|
||||
return 1
|
||||
@ -320,7 +320,7 @@ function cmp_rpm_meta ()
|
||||
cat $rpm_meta_old | trim_release_old > $file1
|
||||
cat $rpm_meta_new | trim_release_new > $file2
|
||||
echo "comparing the rpm tags of $name_new"
|
||||
if diff -au $file1 $file2; then
|
||||
if diff --label old-rpm-tags --label new-rpm-tags -au $file1 $file2; then
|
||||
rm $file1 $file2 $rpm_meta_old $rpm_meta_new
|
||||
return 0
|
||||
fi
|
||||
@ -376,7 +376,7 @@ function cmp_rpm_meta ()
|
||||
do
|
||||
: "${REPLY}"
|
||||
files+=( "${REPLY}" )
|
||||
done < <(diff -U0 $file1 $file2 | sed -E -n -e '/^-\//{s/^-//;s/ [0-9a-f]+ [0-9]+$//;p}')
|
||||
done < <(diff -U0 $file1 $file2 | sed -E -n -e '/^\+\//{s/^\+//;s/ [0-9a-f]+ [0-9]+$//;p}')
|
||||
fi
|
||||
|
||||
if test -n "$sh"; then
|
||||
|
10
pkg-diff.sh
10
pkg-diff.sh
@ -198,6 +198,8 @@ diff_two_files()
|
||||
offset=$(( ($offset >> 6) << 6 ))
|
||||
length=512
|
||||
diff -u \
|
||||
--label "old $file (hex)" \
|
||||
--label "new $file (hex)" \
|
||||
<( hexdump -C -s $offset -n $length "old/$file" ) \
|
||||
<( hexdump -C -s $offset -n $length "new/$file" ) | $buildcompare_head
|
||||
return 1
|
||||
@ -789,6 +791,7 @@ compare_archive()
|
||||
: "${REPLY}"
|
||||
filelist+=( "${REPLY}" )
|
||||
done < 'cn'
|
||||
ret=0
|
||||
for f in "${filelist[@]}"
|
||||
do
|
||||
if ! check_single_file "${file}/${f}"
|
||||
@ -801,7 +804,6 @@ compare_archive()
|
||||
fi
|
||||
watchdog_touch
|
||||
done
|
||||
ret=$?
|
||||
else
|
||||
wprint "$file has different file list"
|
||||
diff -u 'co' 'cn'
|
||||
@ -832,7 +834,7 @@ check_single_file()
|
||||
verify_before_processing "${file}" "${dfile}"
|
||||
case "$?" in
|
||||
0) return 0 ;;
|
||||
1) return 1 ;;
|
||||
1) test -z "$check_all" && return 1 ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
@ -901,6 +903,8 @@ check_single_file()
|
||||
ELF*[LM]SB\ pie\ executable*|\
|
||||
setuid\ ELF*[LM]SB\ pie\ executable*)
|
||||
diff --speed-large-files --unified \
|
||||
--label "old $file (disasm)" \
|
||||
--label "new $file (disasm)" \
|
||||
<( $OBJDUMP -d --no-show-raw-insn old/$file |
|
||||
filter_disasm |
|
||||
sed -e "s,old/,," ;
|
||||
@ -973,6 +977,8 @@ check_single_file()
|
||||
for section in $sections
|
||||
do
|
||||
diff --unified \
|
||||
--label "old $file (objdump)" \
|
||||
--label "new $file (objdump)" \
|
||||
<( $OBJDUMP -s -j $section old/$file |
|
||||
sed -e "s,^old/,," ;
|
||||
echo "${PIPESTATUS[@]}" > $file1) \
|
||||
|
Loading…
Reference in New Issue
Block a user