]> granicus.if.org Git - llvm/commitdiff
test-release.sh: Perform the sed substitution on both files (PR42739)
authorHans Wennborg <hans@hanshq.net>
Mon, 5 Aug 2019 13:04:12 +0000 (13:04 +0000)
committerHans Wennborg <hans@hanshq.net>
Mon, 5 Aug 2019 13:04:12 +0000 (13:04 +0000)
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

utils/release/test-release.sh

index 558e01d2eabc84ae2394efffa43d0e96968352b4..031687f6e4ba22b593ac06951cd957b8ef923c0a 100755 (executable)
@@ -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