From c3a7eda1272fb198a1519ab9cf58310366d3e593 Mon Sep 17 00:00:00 2001 From: "rhelmer@mozilla.com" Date: Wed, 26 Dec 2007 12:37:56 -0800 Subject: [PATCH] fail on binary diff r=cf b=408157 --- testing/release/common/check_updates.sh | 22 +++++++++++++++++----- testing/release/updates/verify.sh | 9 +++++++-- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/testing/release/common/check_updates.sh b/testing/release/common/check_updates.sh index d16dbf7a50bc..ff3a77f2bbd2 100755 --- a/testing/release/common/check_updates.sh +++ b/testing/release/common/check_updates.sh @@ -57,9 +57,21 @@ check_updates () { return 1 fi - diff -r \ - -x installed-chrome.txt \ - -x removed-files \ - source/$platform_dirname target/$platform_dirname - return $? + diff -r source/$platform_dirname target/$platform_dirname > results.diff + err=$? + cat results.diff + grep '^Binary files' results.diff > /dev/null + if [ $? == 0 ] + then + echo "FAIL: binary files found in diff" + return 1 + elif [ -s results.diff ] + then + echo "WARN: non-binary files found in diff" + return 2 + else + # unknown error + echo "FAIL: Unknown error from diff exit code: $err" + return 3 + fi } diff --git a/testing/release/updates/verify.sh b/testing/release/updates/verify.sh index d7a38c26fee0..11c9e4324d83 100755 --- a/testing/release/updates/verify.sh +++ b/testing/release/updates/verify.sh @@ -130,9 +130,14 @@ do target_file=`basename "$to_path"` check_updates "$platform" "downloads/$source_file" "downloads/$target_file" $locale err=$? - if [ "$err" != "0" ]; then - echo "WARN: check_update returned non-zero exit code for $platform downloads/$source_file vs. downloads/$target_file: $err" + if [ "$err" == "0" ]; then continue + elif [ "$err" == "1" ]; then + echo "FAIL: check_updates returned failure for $platform downloads/$source_file vs. downloads/$target_file: $err" + elif [ "$err" == "2" ]; then + echo "WARN: check_updates returned warning for $platform downloads/$source_file vs. downloads/$target_file: $err" + else + echo "FAIL: check_updates returned unknown error for $platform downloads/$source_file vs. downloads/$target_file: $err" fi fi done