From 050153336793e05f90b5a0219fa02db398948394dc84dcfbfa0f31c22b844394 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 20 Jan 2012 11:14:57 +0000 Subject: [PATCH] Accepting request 100864 from home:a_jaeger:branches:build-compare-test Sort rpmlint.log files first. OBS-URL: https://build.opensuse.org/request/show/100864 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=111 --- build-compare.changes | 5 +++++ same-build-result.sh | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build-compare.changes b/build-compare.changes index ba3307f..61690fb 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jan 20 08:49:39 UTC 2012 - aj@suse.de + +- Sort rpmlint.log files first since the order is non-deterministic. + ------------------------------------------------------------------- Thu Jan 12 12:59:31 UTC 2012 - aj@suse.de diff --git a/same-build-result.sh b/same-build-result.sh index ecaa7bb..47f3fe7 100644 --- a/same-build-result.sh +++ b/same-build-result.sh @@ -90,11 +90,16 @@ RPMLINTDIR=/home/abuild/rpmbuild/OTHER if test -e $OLDDIR/rpmlint.log -a -e $RPMLINTDIR/rpmlint.log; then echo "comparing $OLDDIR/rpmlint.log and $RPMLINTDIR/rpmlint.log" - if ! cmp -s $OLDDIR/rpmlint.log $RPMLINTDIR/rpmlint.log; then + # Sort the files first since the order of messages is not deterministic + sort -u $OLDDIR/rpmlint.log > $OLDDIR/rpmlint.log.sorted + sort -u $RPMLINTDIR/rpmlint.log > $RPMLINTDIR/rpmlint.log.sorted + if ! cmp -s $OLDDIR/rpmlint.log.sorted $RPMLINTDIR/rpmlint.log.sorted; then echo "rpmlint.log files differ:" diff -u $OLDDIR/rpmlint.log $RPMLINTDIR/rpmlint.log|head -n 20 + rm $OLDDIR/rpmlint.log.sorted $RPMLINTDIR/rpmlint.log.sorted exit 1 fi + rm $OLDDIR/rpmlint.log.sorted $RPMLINTDIR/rpmlint.log.sorted fi if test $SUCCESS -eq 0; then