From a93239b7c6f0d78cb8836768c3ffbc39fb15b79f Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Thu, 12 Sep 2013 03:18:20 +0000 Subject: [PATCH] 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@190581 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/release/test-release.sh | 39 ++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/utils/release/test-release.sh b/utils/release/test-release.sh index 86200fdd84e..1eb64698227 100755 --- a/utils/release/test-release.sh +++ b/utils/release/test-release.sh @@ -26,6 +26,7 @@ Base_url="http://llvm.org/svn/llvm-project" 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