summaryrefslogtreecommitdiff
path: root/tcwg-llvm-release.sh
diff options
context:
space:
mode:
authorThomas Preud'homme <thomas.preudhomme@linaro.org>2018-08-31 18:03:38 +0100
committerThomas Preud'homme <thomas.preudhomme@linaro.org>2018-09-12 12:13:31 +0100
commit8e9373ed9611ab5de84586c96a91ec4fac85959f (patch)
tree2a0925c264bbefa6e5b88f9ccbc12940eaf300e2 /tcwg-llvm-release.sh
parent71ec686be47430d5766f1679f2552c3eae4f807d (diff)
Add support for LLVM release from branches
To test the LLVM release process for regressions tcwg-llvm-release.sh needs to be able to build from a branch. The underlying test-release.sh script from upstream LLVM already has such support via the -svn-path option but tcwg-llvm-release.sh interface does not expose it. This patch extends the --candidate option to support the values trunk and branch=<LLVM branch>. Change-Id: Ia01a877b62457b462e718ec8019bc8374dad6e5a
Diffstat (limited to 'tcwg-llvm-release.sh')
-rwxr-xr-xtcwg-llvm-release.sh41
1 files changed, 26 insertions, 15 deletions
diff --git a/tcwg-llvm-release.sh b/tcwg-llvm-release.sh
index cb5bbbec..edebc0bc 100755
--- a/tcwg-llvm-release.sh
+++ b/tcwg-llvm-release.sh
@@ -36,7 +36,7 @@ TOOLCHAIN_FILE=""
# Command line parsing
while [ "$#" -gt 0 ]; do
ARG=$(echo "$1" | cut -d "=" -f 1)
- VAL=$(echo "$1" | cut -d "=" -s -f 2)
+ VAL=$(echo "$1" | cut -d "=" -s -f 2-)
case "$ARG" in
--release)
RELEASE="$VAL"
@@ -48,20 +48,31 @@ while [ "$#" -gt 0 ]; do
shift ;;
--candidate)
CANDIDATE="$VAL"
- if [[ "$CANDIDATE" = "final" ]]; then
- RCCALL="-final"
- RCTAG=""
- RCDIR="final"
- elif [[ "$CANDIDATE" -gt 0 ]]; then
- RCCALL="-rc $CANDIDATE"
- RCTAG="-rc$CANDIDATE"
- RCDIR="rc$CANDIDATE"
- else
- echo "ERROR: $1"
- echo "Syntax: $SYN_CANDIDATE"
- exit 1
- fi
-
+ case "$CANDIDATE" in
+ final)
+ RCCALL="-final"
+ RCTAG=""
+ RCDIR="final";;
+ trunk)
+ RCCALL="-svn-path trunk"
+ RCTAG=""
+ RCDIR="trunk";;
+ branch=*)
+ BRANCHNAME="branches/${CANDIDATE#branch=}"
+ RCCALL="-svn-path $BRANCHNAME"
+ RCTAG=""
+ RCDIR="`echo $BRANCHNAME | sed -e 's,/,_,g'`";;
+ *)
+ if [[ "$CANDIDATE" -gt 0 ]]; then
+ RCCALL="-rc $CANDIDATE"
+ RCTAG="-rc$CANDIDATE"
+ RCDIR="rc$CANDIDATE"
+ else
+ echo "ERROR: $1"
+ echo "Syntax: $SYN_CANDIDATE"
+ exit 1
+ fi;;
+ esac
shift ;;
--workspace)
if [ -d "$VAL" ]; then