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