From: Hans Wennborg Date: Mon, 5 Aug 2019 13:04:12 +0000 (+0000) Subject: test-release.sh: Perform the sed substitution on both files (PR42739) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ff20addbcbafca6c70ff6f4cd6729fcf57e1658;p=llvm test-release.sh: Perform the sed substitution on both files (PR42739) The comparison would otherwise fail if Phase2 occurrs naturally in the object file. It would get replaced with Phase3 in the one .o, but not in the other. We were already running both files through sed to have them processed in this same way; this is a logical extension of that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367847 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/release/test-release.sh b/utils/release/test-release.sh index 558e01d2eab..031687f6e4b 100755 --- a/utils/release/test-release.sh +++ b/utils/release/test-release.sh @@ -591,11 +591,12 @@ for Flavor in $Flavors ; do for p2 in `find $llvmCore_phase2_objdir -name '*.o'` ; do p3=`echo $p2 | sed -e 's,Phase2,Phase3,'` # Substitute 'Phase2' for 'Phase3' in the Phase 2 object file in - # case there are build paths in the debug info. On some systems, - # sed adds a newline to the output, so pass $p3 through sed too. + # case there are build paths in the debug info. Do the same sub- + # stitution on both files in case the string occurrs naturally. if ! cmp -s \ <(env LC_CTYPE=C sed -e 's,Phase2,Phase3,g' -e 's,Phase1,Phase2,g' $p2) \ - <(env LC_CTYPE=C sed -e '' $p3) 16 16; then + <(env LC_CTYPE=C sed -e 's,Phase2,Phase3,g' -e 's,Phase1,Phase2,g' $p3) \ + 16 16; then echo "file `basename $p2` differs between phase 2 and phase 3" fi done