From b1695b496605b477e3e2a562fe62520f6217e28a Mon Sep 17 00:00:00 2001 From: Michael Youngstrom Date: Thu, 28 Feb 2019 13:50:49 -0500 Subject: [PATCH] Change git checkout on xdist workers --- scripts/xdist/prepare_xdist_nodes.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/xdist/prepare_xdist_nodes.sh b/scripts/xdist/prepare_xdist_nodes.sh index a647272d05..af221f8f96 100644 --- a/scripts/xdist/prepare_xdist_nodes.sh +++ b/scripts/xdist/prepare_xdist_nodes.sh @@ -7,12 +7,19 @@ python scripts/xdist/pytest_container_manager.py -a up -n ${XDIST_NUM_TASKS} \ -s ${XDIST_CONTAINER_SUBNET} \ -sg ${XDIST_CONTAINER_SECURITY_GROUP} +# Need to map remote branch to local branch when fetching a branch other than master +if [ "$XDIST_GIT_BRANCH" == "master" ]; then + XDIST_GIT_FETCH_STRING="$XDIST_GIT_BRANCH" +else + XDIST_GIT_FETCH_STRING="$XDIST_GIT_BRANCH:$XDIST_GIT_BRANCH" +fi + ip_list=$(