[llvm-branch-commits] [llvm-branch] r190581 - Add -dot flag to test-release.sh

Tom Stellard thomas.stellard at amd.com
Wed Sep 11 20:18:20 PDT 2013


Author: tstellar
Date: Wed Sep 11 22:18:20 2013
New Revision: 190581

URL: http://llvm.org/viewvc/llvm-project?rev=190581&view=rev
Log:
Add -dot flag to test-release.sh

This is meant to be used when testing dot releases e.g.:

./test-release -release 3.3 -dot 1 -rc 1

Modified:
    llvm/branches/release_33/utils/release/test-release.sh

Modified: llvm/branches/release_33/utils/release/test-release.sh
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_33/utils/release/test-release.sh?rev=190581&r1=190580&r2=190581&view=diff
==============================================================================
--- llvm/branches/release_33/utils/release/test-release.sh (original)
+++ llvm/branches/release_33/utils/release/test-release.sh Wed Sep 11 22:18:20 2013
@@ -26,6 +26,7 @@ Base_url="http://llvm.org/svn/llvm-proje
 Release=""
 Release_no_dot=""
 RC=""
+DOT=""
 do_checkout="yes"
 do_ada="no"
 do_clang="yes"
@@ -43,6 +44,7 @@ function usage() {
     echo ""
     echo " -release X.Y      The release number to test."
     echo " -rc NUM           The pre-release candidate number."
+    echo " -dot NUM          The dot number to test e.g. X.Y.Dot."
     echo " -final            The final release candidate."
     echo " -j NUM            Number of compile jobs to run. [default: 3]"
     echo " -build-dir DIR    Directory to perform testing in. [default: pwd]"
@@ -72,6 +74,10 @@ while [ $# -gt 0 ]; do
         -final | --final )
             RC=final
             ;;
+        -dot | --dot )
+            shift
+            DOT="$1"
+            ;;
         -j* )
             NumJobs="`echo $1 | sed -e 's,-j\([0-9]*\),\1,g'`"
             if [ -z "$NumJobs" ]; then
@@ -136,6 +142,17 @@ if [ -z "$RC" ]; then
     exit 1
 fi
 
+# Append the dot number if necessary and determine the SVN tag name.
+SvnDotTag="RELEASE_$Release_no_dot/"
+SvnNoDotTag=""
+if [ -n "$DOT" ]; then
+    Release="$Release.$DOT"
+    SvnNoDotTag="${SvnDotTag}/final"
+    SvnDotTag="${SvnDotTag}dot${DOT}-"
+
+fi
+SvnDotTag="$SvnDotTag$RC"
+
 # Figure out how many make processes to run.
 if [ -z "$NumJobs" ]; then
     NumJobs=`sysctl -n hw.activecpu 2> /dev/null || true`
@@ -181,12 +198,27 @@ if [ "$do_dragonegg" = "yes" ]; then
 fi
 
 
+function get_svn_tag() {
+    if [ -z $DOT ]; then
+        SvnTag="$SvnDotTag"
+    else
+        case $1 in
+            llvm | cfe)
+                SvnTag="$SvnDotTag"
+                ;;
+            *)
+                SvnTag="$SvnNoDotTag"
+                ;;
+        esac
+    fi
+}
+
 # Make sure that the URLs are valid.
 function check_valid_urls() {
     for proj in $projects ; do
         echo "# Validating $proj SVN URL"
-
-        if ! svn ls $Base_url/$proj/tags/RELEASE_$Release_no_dot/$RC > /dev/null 2>&1 ; then
+        get_svn_tag $proj
+        if ! svn ls $Base_url/$proj/tags/$SvnTag > /dev/null 2>&1 ; then
             echo "llvm $Release release candidate $RC doesn't exist!"
             exit 1
         fi
@@ -199,7 +231,8 @@ function export_sources() {
 
     for proj in $projects ; do
         echo "# Exporting $proj $Release-RC$RC sources"
-        if ! svn export -q $Base_url/$proj/tags/RELEASE_$Release_no_dot/$RC $proj.src ; then
+        get_svn_tag $proj
+        if ! svn export -q $Base_url/$proj/tags/$SvnTag $proj.src ; then
             echo "error: failed to export $proj project"
             exit 1
         fi





More information about the llvm-branch-commits mailing list