summaryrefslogtreecommitdiff
path: root/tcwg-llvm-testsuite.sh
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2017-04-19 16:46:44 +0100
committerRenato Golin <renato.golin@linaro.org>2017-04-20 10:28:27 +0100
commit63a2eaed34053088f2b499ec72d51258d13031cf (patch)
treec59526801afad024f874e03372d617ef1674c022 /tcwg-llvm-testsuite.sh
parente3fc7c8c625a4b341fe27dba6058c3b761cbff7f (diff)
tcwg-llvm-*: Use reference git clone
Updates: - Using $REFDIR instead of hard-coding (don't need parameter yet) - Using flock on non-new directory, to avoid rsync problems Change-Id: I64aff86df2cf0090b87e35ca3bc588ba39473781
Diffstat (limited to 'tcwg-llvm-testsuite.sh')
-rwxr-xr-xtcwg-llvm-testsuite.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/tcwg-llvm-testsuite.sh b/tcwg-llvm-testsuite.sh
index 40f88940..717acb4e 100755
--- a/tcwg-llvm-testsuite.sh
+++ b/tcwg-llvm-testsuite.sh
@@ -72,8 +72,12 @@ while [ "$#" -gt 0 ]; do
esac
done
+# Dirs
+REFDIR="$HOME/llvm-reference"
+
# Dump
echo "WORKSPACE = $WORKSPACE"
+echo "REFDIR = $REFDIR"
echo "TOOLCHAIN = $TOOLCHAIN"
echo "CC = $CC"
echo "CXX = $CXX"
@@ -83,8 +87,15 @@ LOGBASE="$WORKSPACE/tcwg-llvm"
LOGEXT="txt"
# Checkout
-git clone --depth 1 http://llvm.org/git/test-suite.git "$WORKSPACE/test-suite" |& tee "$LOGBASE-clone.$LOGEXT"
-git clone --depth 1 http://llvm.org/git/lnt.git "$WORKSPACE/lnt" |& tee -a "$LOGBASE-clone.$LOGEXT"
+{
+ flock -s 9
+ git clone --depth 1 http://llvm.org/git/test-suite.git \
+ --reference "$REFDIR/test-suite" \
+ "$WORKSPACE/test-suite" |& tee "$LOGBASE-clone.$LOGEXT"
+ git clone --depth 1 http://llvm.org/git/lnt.git \
+ --reference "$REFDIR/lnt" \
+ "$WORKSPACE/lnt" |& tee -a "$LOGBASE-clone.$LOGEXT"
+) 9>$REFDIR.lock
# Prepare
python=$(which python2)