- 2015.03.20
- Convert correct png file before comparison - Avoid name clashes when comparing png files - Handle filename changes gracefully when comparing unknown filetypes - Use generic helper to compare png files OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=177
This commit is contained in:
parent
a3ff50b6b4
commit
30706038f0
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 20 18:58:22 UTC 2015 - olaf@aepfle.de
|
||||||
|
|
||||||
|
- 2015.03.20
|
||||||
|
- Convert correct png file before comparison
|
||||||
|
- Avoid name clashes when comparing png files
|
||||||
|
- Handle filename changes gracefully when comparing unknown filetypes
|
||||||
|
- Use generic helper to compare png files
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 12 10:41:45 UTC 2015 - olaf@aepfle.de
|
Thu Feb 12 10:41:45 UTC 2015 - 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: 2015.02.10
|
Version: 2015.03.20
|
||||||
Release: 0
|
Release: 0
|
||||||
Source1: COPYING
|
Source1: COPYING
|
||||||
Source2: same-build-result.sh
|
Source2: same-build-result.sh
|
||||||
|
@ -255,4 +255,4 @@ function cmp_spec ()
|
|||||||
rm $file1 $file2
|
rm $file1 $file2
|
||||||
return $RES
|
return $RES
|
||||||
}
|
}
|
||||||
# vim: tw=666 ts=2 et
|
# vim: tw=666 ts=2 shiftwidth=2 et
|
||||||
|
30
pkg-diff.sh
30
pkg-diff.sh
@ -154,14 +154,24 @@ dfile=`mktemp`
|
|||||||
|
|
||||||
diff_two_files()
|
diff_two_files()
|
||||||
{
|
{
|
||||||
if ! cmp -s old/$file new/$file; then
|
if test ! -e old/$file; then
|
||||||
|
echo "Missing in old package: $file"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
if test ! -e new/$file; then
|
||||||
|
echo "Missing in new package: $file"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if cmp -s old/$file new/$file; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
echo "$file differs ($ftype)"
|
echo "$file differs ($ftype)"
|
||||||
hexdump -C old/$file > $file1
|
hexdump -C old/$file > $file1
|
||||||
hexdump -C new/$file > $file2
|
hexdump -C new/$file > $file2
|
||||||
diff -u $file1 $file2 | head -n 200
|
diff -u $file1 $file2 | head -n 200
|
||||||
return 1
|
return 1
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
trim_man_first_line()
|
trim_man_first_line()
|
||||||
@ -413,13 +423,11 @@ check_single_file()
|
|||||||
*png)
|
*png)
|
||||||
# Try to remove timestamps, only if convert from ImageMagick is installed
|
# Try to remove timestamps, only if convert from ImageMagick is installed
|
||||||
if [[ $(type -p convert) ]]; then
|
if [[ $(type -p convert) ]]; then
|
||||||
convert old/$file +set date:create +set date:modify old/${file/.png/_n.png}
|
convert old/$file +set date:create +set date:modify old/${file}.$PPID.$$
|
||||||
convert old/$file +set date:create +set date:modify new/${file/.png/_n.png}
|
convert new/$file +set date:create +set date:modify new/${file}.$PPID.$$
|
||||||
if ! cmp -s old/${file/.png/_n.png} new/${file/.png/_n.png}; then
|
mv -f old/${file}.$PPID.$$ old/${file}
|
||||||
echo "$file differs ($ftype)"
|
mv -f new/${file}.$PPID.$$ new/${file}
|
||||||
hexdump -C old/${file/.png/_n.png} > $file1
|
if ! diff_two_files; then
|
||||||
hexdump -C new/${file/.png/_n.png} > $file2
|
|
||||||
diff -u $file1 $file2 | head -n 20
|
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
@ -762,4 +770,4 @@ if test "$ret" = 0; then
|
|||||||
echo "Package content is identical"
|
echo "Package content is identical"
|
||||||
fi
|
fi
|
||||||
exit $ret
|
exit $ret
|
||||||
# vim: tw=666 ts=2 et
|
# vim: tw=666 ts=2 shiftwidth=2 et
|
||||||
|
@ -141,4 +141,4 @@ if test $SUCCESS -eq 0; then
|
|||||||
fi
|
fi
|
||||||
echo 'compare validated built as identical !'
|
echo 'compare validated built as identical !'
|
||||||
exit 0
|
exit 0
|
||||||
# vim: tw=666 ts=2 et
|
# vim: tw=666 ts=2 shiftwidth=2 et
|
||||||
|
@ -97,4 +97,4 @@ done
|
|||||||
|
|
||||||
rm -rf $dir
|
rm -rf $dir
|
||||||
exit $ret
|
exit $ret
|
||||||
# vim: tw=666 ts=2 et
|
# vim: tw=666 ts=2 shiftwidth=2 et
|
||||||
|
Loading…
Reference in New Issue
Block a user