From 628ba81a77b62c22672d34ac251347d320f61269 Mon Sep 17 00:00:00 2001
From: Daniel Wagner-Hall <daniel@matrix.org>
Date: Wed, 18 Nov 2015 23:22:27 +0000
Subject: [PATCH] Share sytest clone across runs

Depends on https://github.com/matrix-org/synapse/pull/380
---
 jenkins.sh | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/jenkins.sh b/jenkins.sh
index 4804022e80..8d2ac63c56 100755
--- a/jenkins.sh
+++ b/jenkins.sh
@@ -17,14 +17,20 @@ export PEP8SUFFIX="--output-file=violations.flake8.log || echo flake8 finished w
 
 tox
 
-: ${GIT_BRANCH:="$(git rev-parse --abbrev-ref HEAD)"}
+: ${GIT_BRANCH:="origin/$(git rev-parse --abbrev-ref HEAD)"}
 
 set +u
 . .tox/py27/bin/activate
 set -u
 
+if [[ ! -e .sytest-base ]]; then
+  git clone https://github.com/matrix-org/sytest.git .sytest-base --mirror
+else
+  (cd .sytest-base; git fetch)
+fi
+
 rm -rf sytest
-git clone https://github.com/matrix-org/sytest.git sytest
+git clone .sytest-base sytest --shared
 cd sytest
 
 git checkout "${GIT_BRANCH}" || (echo >&2 "No ref ${GIT_BRANCH} found, falling back to develop" ; git checkout develop)
-- 
GitLab