llvm.org GIT mirror llvm / release_33
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 Tom Stellard 5 years ago
1 changed file(s) with 36 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
2525 Release=""
2626 Release_no_dot=""
2727 RC=""
28 DOT=""
2829 do_checkout="yes"
2930 do_ada="no"
3031 do_clang="yes"
4243 echo ""
4344 echo " -release X.Y The release number to test."
4445 echo " -rc NUM The pre-release candidate number."
46 echo " -dot NUM The dot number to test e.g. X.Y.Dot."
4547 echo " -final The final release candidate."
4648 echo " -j NUM Number of compile jobs to run. [default: 3]"
4749 echo " -build-dir DIR Directory to perform testing in. [default: pwd]"
7173 -final | --final )
7274 RC=final
7375 ;;
76 -dot | --dot )
77 shift
78 DOT="$1"
79 ;;
7480 -j* )
7581 NumJobs="`echo $1 | sed -e 's,-j\([0-9]*\),\1,g'`"
7682 if [ -z "$NumJobs" ]; then
134140 echo "error: no release candidate number specified"
135141 exit 1
136142 fi
143
144 # Append the dot number if necessary and determine the SVN tag name.
145 SvnDotTag="RELEASE_$Release_no_dot/"
146 SvnNoDotTag=""
147 if [ -n "$DOT" ]; then
148 Release="$Release.$DOT"
149 SvnNoDotTag="${SvnDotTag}/final"
150 SvnDotTag="${SvnDotTag}dot${DOT}-"
151
152 fi
153 SvnDotTag="$SvnDotTag$RC"
137154
138155 # Figure out how many make processes to run.
139156 if [ -z "$NumJobs" ]; then
180197 fi
181198
182199
200 function get_svn_tag() {
201 if [ -z $DOT ]; then
202 SvnTag="$SvnDotTag"
203 else
204 case $1 in
205 llvm | cfe)
206 SvnTag="$SvnDotTag"
207 ;;
208 *)
209 SvnTag="$SvnNoDotTag"
210 ;;
211 esac
212 fi
213 }
214
183215 # Make sure that the URLs are valid.
184216 function check_valid_urls() {
185217 for proj in $projects ; do
186218 echo "# Validating $proj SVN URL"
187
188 if ! svn ls $Base_url/$proj/tags/RELEASE_$Release_no_dot/$RC > /dev/null 2>&1 ; then
219 get_svn_tag $proj
220 if ! svn ls $Base_url/$proj/tags/$SvnTag > /dev/null 2>&1 ; then
189221 echo "llvm $Release release candidate $RC doesn't exist!"
190222 exit 1
191223 fi
198230
199231 for proj in $projects ; do
200232 echo "# Exporting $proj $Release-RC$RC sources"
201 if ! svn export -q $Base_url/$proj/tags/RELEASE_$Release_no_dot/$RC $proj.src ; then
233 get_svn_tag $proj
234 if ! svn export -q $Base_url/$proj/tags/$SvnTag $proj.src ; then
202235 echo "error: failed to export $proj project"
203236 exit 1
204237 fi