[llvm-branch-commits] [llvm-branch] r142483 - in /llvm/branches/release_30: ./ utils/release/test-release.sh

Bill Wendling isanbard at gmail.com
Wed Oct 19 01:45:26 PDT 2011


Author: void
Date: Wed Oct 19 03:45:26 2011
New Revision: 142483

URL: http://llvm.org/viewvc/llvm-project?rev=142483&view=rev
Log:
Merging r142482:
------------------------------------------------------------------------
r142482 | void | 2011-10-19 01:42:07 -0700 (Wed, 19 Oct 2011) | 1 line

Make changes so that this runs on FreeBSD.
------------------------------------------------------------------------

Modified:
    llvm/branches/release_30/   (props changed)
    llvm/branches/release_30/utils/release/test-release.sh

Propchange: llvm/branches/release_30/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 19 03:45:26 2011
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:142039,142055,142058,142112,142123,142125,142165,142243
+/llvm/trunk:142039,142055,142058,142112,142123,142125,142165,142243,142482

Modified: llvm/branches/release_30/utils/release/test-release.sh
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_30/utils/release/test-release.sh?rev=142483&r1=142482&r2=142483&view=diff
==============================================================================
--- llvm/branches/release_30/utils/release/test-release.sh (original)
+++ llvm/branches/release_30/utils/release/test-release.sh Wed Oct 19 03:45:26 2011
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #===-- test-release.sh - Test the LLVM release candidates ------------------===#
 #
 #                     The LLVM Compiler Infrastructure
@@ -12,9 +12,13 @@
 #
 #===------------------------------------------------------------------------===#
 
-set -e                          # Exit if any command fails
+if [ `uname -s` = "FreeBSD" ]; then
+    MAKE=gmake
+else
+    MAKE=make
+fi
 
-projects="llvm cfe dragonegg test-suite compiler-rt libcxx libcxxabi"
+projects="llvm cfe dragonegg test-suite"
 
 # Base SVN URL for the sources.
 Base_url="http://llvm.org/svn/llvm-project"
@@ -28,6 +32,7 @@
 do_fortran="no"
 do_64bit="yes"
 do_debug="no"
+do_asserts="no"
 BuildDir="`pwd`"
 
 function usage() {
@@ -43,6 +48,7 @@
     echo " -enable-fortran   Enable Fortran build. [default: disable]"
     echo " -disable-objc     Disable ObjC build. [default: enable]"
     echo " -test-debug       Test the debug build. [default: no]"
+    echo " -test-asserts     Test with asserts on. [default: no]"
 }
 
 while [ $# -gt 0 ]; do
@@ -85,6 +91,9 @@
         -test-debug | --test-debug )
             do_debug="yes"
             ;;
+        -test-asserts | --test-asserts )
+            do_asserts="yes"
+            ;;
         -help | --help | -h | --h | -\? )
             usage
             exit 0
@@ -158,7 +167,7 @@
     for proj in $projects ; do
         echo "# Validating $proj SVN URL"
 
-        if ! svn ls $Base_url/tags/RELEASE_$Release_no_dot/rc$RC > /dev/null 2>&1 ; then
+        if ! svn ls $Base_url/$proj/tags/RELEASE_$Release_no_dot/rc$RC > /dev/null 2>&1 ; then
             echo "llvm $Release release candidate $RC doesn't exist!"
             exit 1
         fi
@@ -243,13 +252,13 @@
 
     cd $ObjDir
     echo "# Compiling llvm $Release-rc$RC $Flavor"
-    echo "# make -j $NumJobs VERBOSE=1 $ExtraOpts"
-    make -j $NumJobs VERBOSE=1 $ExtraOpts \
+    echo "# ${MAKE} -j $NumJobs VERBOSE=1 $ExtraOpts"
+    ${MAKE} -j $NumJobs VERBOSE=1 $ExtraOpts \
         2>&1 | tee $LogDir/llvm.make-Phase$Phase-$Flavor.log
 
     echo "# Installing llvm $Release-rc$RC $Flavor"
-    echo "# make install"
-    make install \
+    echo "# ${MAKE} install"
+    ${MAKE} install \
         2>&1 | tee $LogDir/llvm.install-Phase$Phase-$Flavor.log
     cd $BuildDir
 }
@@ -260,22 +269,27 @@
     ObjDir="$3"
 
     cd $ObjDir
-    make check-all \
+    ${MAKE} -k check-all \
         2>&1 | tee $LogDir/llvm.check-Phase$Phase-$Flavor.log
-    make unittests \
-        2>&1 | tee $LogDir/llvm.unittests--Phase$Phase-$Flavor.log
+    ${MAKE} -k unittests \
+        2>&1 | tee $LogDir/llvm.unittests-Phase$Phase-$Flavor.log
     cd $BuildDir
 }
 
+set -e                          # Exit if any command fails
+
 if [ "$do_checkout" = "yes" ]; then
     export_sources
 fi
 
 (
-Flavors="Release Release+Asserts"
+Flavors="Release"
 if [ "$do_debug" = "yes" ]; then
     Flavors="Debug $Flavors"
 fi
+if [ "$do_asserts" = "yes" ]; then
+    Flavors="$Flavors Release+Asserts"
+fi
 if [ "$do_64bit" = "yes" ]; then
     Flavors="$Flavors Release-64"
 fi
@@ -297,15 +311,22 @@
     llvmCore_phase2_objdir=$BuildDir/Phase2/$Flavor/llvmCore-$Release-rc$RC.obj
     llvmCore_phase2_installdir=$BuildDir/Phase2/$Flavor/llvmCore-$Release-rc$RC.install
 
+    llvmCore_phase3_objdir=$BuildDir/Phase3/$Flavor/llvmCore-$Release-rc$RC.obj
+    llvmCore_phase3_installdir=$BuildDir/Phase3/$Flavor/llvmCore-$Release-rc$RC.install
+
     rm -rf $llvmCore_phase1_objdir
     rm -rf $llvmCore_phase1_installdir
     rm -rf $llvmCore_phase2_objdir
     rm -rf $llvmCore_phase2_installdir
+    rm -rf $llvmCore_phase3_objdir
+    rm -rf $llvmCore_phase3_installdir
 
     mkdir -p $llvmCore_phase1_objdir
     mkdir -p $llvmCore_phase1_installdir
     mkdir -p $llvmCore_phase2_objdir
     mkdir -p $llvmCore_phase2_installdir
+    mkdir -p $llvmCore_phase3_objdir
+    mkdir -p $llvmCore_phase3_installdir
 
     ############################################################################
     # Phase 1: Build llvmCore and llvmgcc42
@@ -325,11 +346,36 @@
     build_llvmCore 2 $Flavor \
         $llvmCore_phase2_objdir
 
+    ############################################################################
+    # Phase 3: Build llvmCore with newly built clang from phase 2.
+    c_compiler=$llvmCore_phase2_installdir/bin/clang
+    cxx_compiler=$llvmCore_phase2_installdir/bin/clang++
+    echo "# Phase 3: Building llvmCore"
+    configure_llvmCore 3 $Flavor \
+        $llvmCore_phase3_objdir $llvmCore_phase3_installdir
+    build_llvmCore 3 $Flavor \
+        $llvmCore_phase3_objdir
+
+    ############################################################################
+    # Testing: Test phase 3
     echo "# Testing - built with clang"
-    test_llvmCore 2 $Flavor $llvmCore_phase2_objdir
+    test_llvmCore 3 $Flavor $llvmCore_phase3_objdir
+
+    ############################################################################
+    # Compare .o files between Phase2 and Phase3 and report which ones differ.
+    echo
+    echo "# Comparing Phase 2 and Phase 3 files"
+    for o in `find $llvmCore_phase2_objdir -name '*.o'` ; do
+        p3=`echo $o | sed -e 's,Phase2,Phase3,'`
+        if ! cmp --ignore-initial=16 $o $p3 > /dev/null 2>&1 ; then
+            echo "file `basename $o` differs between phase 2 and phase 3"
+        fi
+    done
 done
 ) 2>&1 | tee $LogDir/testing.$Release-rc$RC.log
 
+set +e
+
 # Woo hoo!
 echo "### Testing Finished ###"
 echo "### Logs: $LogDir"





More information about the llvm-branch-commits mailing list